Re: Table format gets lost while write to outputfile?
- To: mathgroup at smc.vnet.net
- Subject: [mg44798] Re: Table format gets lost while write to outputfile?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 27 Nov 2003 11:38:22 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <bpurrm$obo$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Put[] or >> ist to write Mathematica syntax. You search for Export["yourDataFile",new,"Table"] *without* the TableForm. Regards Jens 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