Table format gets lost while write to outputfile?
- To: mathgroup at smc.vnet.net
- Subject: [mg44770] Table format gets lost while write to outputfile?
- From: "jc" <lzhang1 at uci.edu>
- Date: Tue, 25 Nov 2003 00:45:40 -0500 (EST)
- Organization: University of California, Irvine
- Sender: owner-wri-mathgroup at wolfram.com
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!!!
jc
- Follow-Ups:
- Re: Table format gets lost while write to outputfile?
- From: Yasvir Tesiram <tesiramy@omrf.ouhsc.edu.au>
- Re: Table format gets lost while write to outputfile?