Re: Export to file
- To: mathgroup at smc.vnet.net
- Subject: [mg50918] Re: [mg50904] Export to file
- From: "David Annetts" <davidannetts at ihug.com.au>
- Date: Tue, 28 Sep 2004 00:58:27 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Cysterna, > For[i = 0. i < 100 , i += 1, > PutAppend[ > StringJoin[ > ToString[sX[i]], > " ", > ToString[sY[i]], > " ", > ToString[sZ[i]]], > "C:/MyPoints.txt"] > ] For the above code to work, you need to wrap the entire string in OutputForm. But first, you have to correct all the typos. However, since you're using 4.x, why not use Export? sX = Table[Random[Real, {-1, 1}], {100}]; sY = Table[Random[Real, {-1, 1}], {100}]; sZ = Table[Random[Real, {-1, 1}], {100}]; tbl = Transpose[{sX, sY, sZ}]; Export["c:\points.txt", tbl, "Table"] Regards, Dave.