| Author |
Comment/Response |
jc
|
11/24/03 1:56pm
I try to write out some data to a file. I need them to be in a table form. I.e. Each row is an instance, and each column is the value for each time point.
I successfully use the below function to get the correct format in mathematica
new = Table[trajectory[j][t], {j, 1, 11}, {t, 0, 100, 1}]
datainfile = TableForm[new, TableHeadings -> {None, Automatic} ]
The output looks good so far, it likes
1 2 3 4 5 ....
0.1 0.2 0.3 0.5 0.8
1.0 1.1 1.2 1.8 1.0
0.3 0.5 1.0 0.9 1.0
...
however, when I type in
datainfile >> outputfile
The output file "outputfile" does not contain the correct format , it becomes like:
TableForm[{{1., 2, 3, 4,
5,...},{0.1,0.2,0.3, 0.5,0.8},{1.0, 1.1, 1.2,1.8,1.0}....]
i am just wondering is there anyway to come across the problem and get the kind of format that I want in the output file?
Many Thanks!!!
URL: , |
|