Re: Table format gets lost while write to outputfile?
- To: mathgroup at smc.vnet.net
- Subject: [mg44811] Re: [mg44770] Table format gets lost while write to outputfile?
- From: Yasvir Tesiram <tesiramy at omrf.ouhsc.edu.au>
- Date: Thu, 27 Nov 2003 11:38:50 -0500 (EST)
- References: <200311250545.AAA24641@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
Don't use Put (>>). Use Export.
Yas
On Tue, 25 Nov 2003, jc wrote:
> 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
>
>
- References:
- Table format gets lost while write to outputfile?
- From: "jc" <lzhang1@uci.edu>
- Table format gets lost while write to outputfile?