0
$\begingroup$

I'm new to Mathematica and I can't find in this forum the answer to a relatively simple problem I have with my export. I'm sorry if this is a duplicate.

I want to export a set (list) of variables used in a script to a text file but keeping both the name and the numeric value of the variable. I thought a "Table" would do the job but I manage to export either the name or the value but not both.

Any format would do the job but I prefer the variables to be in different columns: The names of the variables would be the first row of the text file and the numeric values the second row

Any help would be appreciated and thanks for your time

$\endgroup$
3
  • $\begingroup$ Please give a short example of a list of variables like that you have in mind, and what you need to get in, say, a txt file. $\endgroup$ May 22, 2017 at 10:03
  • $\begingroup$ Have you seen this? $\endgroup$ May 22, 2017 at 11:04
  • $\begingroup$ Hello, thanks for your answers. I'd like to have a .txt or .dat file like this: Suppose we have three variables A, B and C with values 10, 5 and -2, then we get a text file like First row (The name of the variables): A , B, C Second row (The numeric value of each variable): 10, 5, -2 @J.M. I see your post, but how can you get only the variables I want to save and no all the variable names ? I use multiple computational variables like counters and so... I would like to save a subset of all my variables. Thanks for your time ! $\endgroup$
    – symduk
    May 22, 2017 at 12:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.