Re: output to a file
- To: mathgroup@smc.vnet.net
- Subject: [mg10911] Re: [mg10841] output to a file
- From: seanross@worldnet.att.net
- Date: Thu, 12 Feb 1998 20:15:54 -0500
- References: <199802110201.VAA13663@smc.vnet.net.>
Nilay Saha wrote: > > Hello everyone, > I have a fairly simple problem to which I have not found a solution. > I have a mathematica program which outputs a set of sets of > parameteres. I wish to write the output to a data file so that I can > manipulate it . > Say I have command in my programme which is: Print[n,' ',t,' ', s4], > where n, t, s4 are the parameters which I evaluate within loops. > What I get is a printed output. Upto here it is OK. But now I wish to > write the output to a data file say "correl.dat" in the same form as > print. > Is it possible? > > Thanks a lot for bearing with me. Bye , Regards, > Nilay Saha > Kamerlingh Onnes Lab, > 2300RA Leiden, > Postbus 9506, > Leidn, > The Netherlands. > Phone: (0031)71 527 5476. This is how I do it. streamout=OpenWrite["correl.dat"]; Write[mydata,streamout]; Close[streamout]; Clear[streamout]; It is important that if you include any kind of a pathname in your output file, like c:\mystuff\today\correl.dat, that you test it first by putting it in quotes and seeing what the string actually is. In the example I made up, the \t would be interpreted as a tab character, so you would need to use c:\mystuff\\today\correl.dat instead. -- Remove the _nospam_ in the return address to respond.
- References:
- output to a file
- From: saha@rulgm0.LeidenUniv.nl (Nilay Saha)
- output to a file