RE: 3d table or list to file
- To: mathgroup at smc.vnet.net
- Subject: [mg34916] RE: [mg34879] 3d table or list to file
- From: "Annetts, Dave (E&M, North Ryde)" <David.Annetts at csiro.au>
- Date: Wed, 12 Jun 2002 02:16:23 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Shawn,
> Is it possible to save 3D lists to file to recall them later.
> Export/Import
> does not seem to work for lists with dimensions greater than 2
It is possible -- just write them. For example, the following sequence
leaves tst and newt equal.
tst = Table[{i, j, k}, {i, 5}, {j, 5, 10}, {k, 25, 30}];
Dimensions[tst]
tst >> "multi.txt"
newt = Read["multi.txt"];
Close["multi.txt"]
The catch with this, is that your file is in 80-column wrapped input form
and so might not be particularly useful with other programs (eg. Excel).
Mostly, I find it more useful to write the file in simple columnar format
via a Do[]; loop.
Regards,
Dave.
--------------------------------------------------------
Dr. David Annetts EM Modelling Analyst
Tel: (+612) 9490 5416 CSIRO DEM, North Ryde
Fax: (+612) 9490 5467 David.Annetts at csiro.au
Include "usual_disclaimers"
--------------------------------------------------------