I have 30 separate data files having similar kind of names. Each file has 100 rows and 3 columns. I have read all the files together using FileNames and finally I have stored all the data in a single variable status. So status has dimensions {30,100,3}
I now want to store data as a1 = status[[1,All,3]], a2 = status[[2,All,3]] …ai = status[[i,All,3]].
How to store the data individually in variables whose name will depend on index value?
Welcome to Wolfram Community!
Please include your code and output using one of the methods explained in the rules: http://wolfr.am/READ-1ST
Something like this?
In[28]:= vars = Table[Symbol["dddd" <> ToString[i]], {i, 1, 10}]
Out[28]= {dddd1, dddd2, dddd3, dddd4, dddd5, dddd6, dddd7, dddd8, \
dddd9, dddd10}
In[29]:= values = Table[i*3, {i, 1, 10}]
Out[29]= {3, 6, 9, 12, 15, 18, 21, 24, 27, 30}
In[31]:= MapThread[Set[#1, #2] &, {vars, values}]
Out[31]= {3, 6, 9, 12, 15, 18, 21, 24, 27, 30}
In[33]:= vars
Out[33]= {3, 6, 9, 12, 15, 18, 21, 24, 27, 30}
or in one line, you need to first evaluate the Symbols:
Table[Evaluate[Symbol["dddde" <> ToString[i]]] = i*3, {i, 1, 10}]
Regards
