Re: outputting lists to a file
- To: mathgroup at smc.vnet.net
- Subject: [mg9886] Re: [mg9837] outputting lists to a file
- From: Luci Ellis <elisha at dot.net.au>
- Date: Sun, 30 Nov 1997 00:39:35 -0500
- Sender: owner-wri-mathgroup at wolfram.com
In David B Wagner's excellent book, "Power Programming with Mathematica: the kernal", there are many suggestions on ways to do this. Try something like: OutputForm[TableForm[thelist,TableSpacing->0]] >> thefilename.txt If you have scientific notation you may have to Map FortranForm around this list first. Hope this helps, Luci >I have a simple problem, > >Suppose I have a mathematica list that represents a number of >n-dimensional vectors. e.g. {{2,3},{3,2},{6,5},{7,7},{1,1}} >which represents five 2d vectors. > >Does anyone know an easy way of outputting this list to a file so that >each line contains just a single n-dim vector with elements seperated >by either spaces or commas. >e.g. for the above example the file should be: > >2 3 >3 2 >6 5 >7 7 >1 1 > >Or > >2,3 >3,2 >6,5 >7,7 >1,1 > >thanks, > >Zahir. -------------- Luci Ellis: elisha at dot.net.au http://www.dot.net.au/~elisha "Secluded in their semi-academic environment, the digerati passionately espoused ideas that in the real world wouldn't fool a cow" -- DH Freedman and CC Mann, "At Large". --------------