help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can octave print text output to file?


From: veryhappy
Subject: Re: Can octave print text output to file?
Date: Tue, 22 Feb 2011 15:18:32 -0800 (PST)

You can use fprintf to write text to a file. Something similar to this will
do the trick:
myfile=fopen("file.txt","w") % Open the file
fprintf(myfile,"%s","Hi! ") % Write a description
fprintf(myfile,"%f",pi) % Write a number
fclose(myfile) % Close the file (very important)

Note that you may have to check for errors while opening the file



-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/Can-octave-print-text-output-to-file-tp1631917p3320244.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]