|
[Date Index]
[Thread Index]
[Author Index]
Re: output to a file
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.
Prev by Date:
Re: Animation and exportation
Next by Date:
Re: Random Order of a Set of Numbers
Prev by thread:
output to a file
Next by thread:
Re: output to a file
|