I have an array which is defined as a table, e.g.
g = Table[ cos[l1*3.]*sqrt[l2*1.]*l3 + l1*1 , {l1, 0, 3}, {l2, 0, 3}, {l3, 0, 3}];
then, I need to save it in the following format
1 1 1 g[1,1,1]
...
i1 i2 i3 g[i1,i2,i3]
If I do something like
Do[ Export[ file, {i, g[[i, 2, 3]]}], {i, 1, 4}];
then it saves only the last line for i == 4
:
4 3 + 2*cos[9.]*sqrt[1.]
Another "subquestion" - is there a way to convert the Table
to float? N
doesn't help.
cos
is not the same asCos
. Please do familiarise yourself with the the basic tutorials in the documentation, as this will save you and other site members a lot of time. – Verbeia♦ Oct 17 '13 at 22:03