Re: output form
- To: mathgroup@smc.vnet.net
- Subject: [mg10679] Re: output form
- From: Allan Hayes <hay@haystack.demon.co.uk>
- Date: Fri, 30 Jan 1998 04:24:17 -0500
- References: <6ahnlq$phe@smc.vnet.net>
Lyre wrote: > > Hi: > I have a question related to the output format. Say I have a table like > v={{-16.2791, -84.7242}, {-15.7936, -82.7819}, {-15.308, -80.8396}} > > I use the following code to write them into a file called "fileout.dat". > > stmp=OpenWrite["fileout.dat",FormatType -> OutputForm]; > Write[stmp,TableForm[v]]; > Close[stmp]; > > I got something like > =============================== > -16.2791 -84.7242 > > -15.7936 -82.7819 > > -15.308 -80.8396 > =============================== > > with blanck lines between each entry instead of > =============================== > -16.2791 -84.7242 > -15.7936 -82.7819 > -15.308 -80.8396 > =============================== > > How do I get rid of the blank lines in between? Thanks. > > Chihsuan > -- > > ------------------------------------------------------------------------- > | Chi-hsuan Lai, Dept of Physics * e-mail: !lai@utpapa.ph.utexas.edu! > | Chihsuan: You can use the TableForm option, TableSpacing: stmp=OpenWrite["fileout.dat",FormatType -> OutputForm]; Write[stmp,TableForm[v, TableSpacing-> {0,3}]]; Close[stmp]; !!fileout.dat -16.2791 -84.7242 -15.7936 -82.7819 -15.308 -80.8396 -- Allan Hayes Mathematica Training and Consulting Leicester, UK hay@haystack.demon.co.uk http://www.haystack.demon.co.uk voice: +44 (0)116 271 4198 fax: +44 (0)116 271 8642