Re: 3d table or list to file
- To: mathgroup at smc.vnet.net
- Subject: [mg34893] Re: [mg34879] 3d table or list to file
- From: "Johannes Ludsteck" <johannes.ludsteck at wiwi.uni-regensburg.de>
- Date: Wed, 12 Jun 2002 02:15:21 -0400 (EDT)
- Organization: Universitaet Regensburg
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mr. O'Connor, if you don't want to export the 3d-table to another program, use DumpSave. To the best of my knowledge this is faster than saving it in ASCII. If you have to write it to an ASCII file, simply transform the 3d-table to a matrix by t2d=Flatten[t3d,1] then export it to a file. If you want to recover t3d from t2d, use Partition[t2d,Dimensions[t3d][[2]]]. Thus you have to remember (or save) the dimension of the second level of t3d. Example: t3d = Table[Random[],{4},{3},{2}]; dimlev2 = Dimensions[t3d][[2]]; Export[path,Flatten[t3d,1],"Table"]; t3dClone = Partition[Import[path,"Table"],dimlev2]; verify this by typing t3dClone == t3d Best regards, Johannes On 11 Jun 2002, at 5:00, Shawn O'Connor wrote: > 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 > > Thank you. > > <><><><><><><><><><><><><><><><><><> Johannes Ludsteck Institut fuer Volkswirtschaftslehre Lehrstuhl Prof. Dr. Moeller Universitaet Regensburg Universitaetsstrasse 31 93053 Regensburg Tel +49/0941/943-2741