MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Export to file


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.


  • Prev by Date: Re: Array construction
  • Next by Date: Re: FindRoot for an oscillating function
  • Previous by thread: Re: Export to file
  • Next by thread: Re: Export to file