Thread Subject: flush diary to file

Subject: flush diary to file

From: cockroach

Date: 27 Jan, 2012 21:29:19

Message: 1 of 2

Hi,

I am using Matlab to do very long computations. The program will
constantly output some information to the screen. So I use the diary
command to write the information to file. However, it seems that the
information will not be written to file until I issue the "diary off"
command. Is there a way to force Matlab constantly write the file once
new information is printed on screen? Note that the information is
output from other programs that I cannot change. So using fprintf or
other file IO commands is not an option for me. Thanks.

Jie

Subject: flush diary to file

From: Steven_Lord

Date: 27 Jan, 2012 22:12:12

Message: 2 of 2



"cockroach" <chen.future.jie@gmail.com> wrote in message
news:7cea7933-0160-4115-9252-efc8d3652504@o9g2000yqa.googlegroups.com...
> Hi,
>
> I am using Matlab to do very long computations. The program will
> constantly output some information to the screen. So I use the diary
> command to write the information to file. However, it seems that the
> information will not be written to file until I issue the "diary off"
> command. Is there a way to force Matlab constantly write the file once
> new information is printed on screen? Note that the information is
> output from other programs that I cannot change. So using fprintf or
> other file IO commands is not an option for me. Thanks.

Start MATLAB with the -logfile option instead of using DIARY?

http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html#bq24t0c

I believe the logfile updates more frequently than the DIARY file.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com