Re: How to transfer the output to general TXT files?
- To: mathgroup at smc.vnet.net
- Subject: [mg17077] Re: How to transfer the output to general TXT files?
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Sat, 17 Apr 1999 03:34:50 -0400
- Organization: University of Western Australia
- References: <7f1eki$kr6@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
bickel wrote: > I generate some data from mathematica. > > If I use "FILE=SAVE AS SPECIAL " TXT files, > > it will save datas , but including some format . > > How do I transfer these datas to general TXT files wirhout those format. One way is to use TableForm and TextForm, e.g., In[1]:= mat = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; In[2]:= TextForm @ TableForm[mat] >> "mat.data" To see how the data was written, display the file: In[3]:= !! mat.data 1 2 3 4 5 6 7 8 9 If you don't like the spacing, you can change it using the TableSpacing option: In[4]:= TextForm @ TableForm[mat, TableSpacing -> {0, 1}] >> "mat.data" In[5]:= !! mat.data 1 2 3 4 5 6 7 8 9 Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://www.physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________