Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

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