|MATLAB Function Reference|
Save session to file
diary function creates a log of keyboard input and the resulting text output, with some exceptions (see Remarks for details). The output of
diary is an ASCII file, suitable for searching in, printing, inclusion in most reports and other documents. If you do not specify
filename, MATLAB creates a file named
diary in the current directory.
diary mode on and off. To see the status of
'). MATLAB returns either
off indicating the
writes a copy of all subsequent keyboard input and the resulting output (except it does not include graphics) to the named file, where
filename is the full pathname or
filename is in the current MATLAB directory. If the file already exists, output is appended to the end of the file. You cannot use a
on. To see the name of the
diary file, use
diary suspends the diary.
diary resumes diary mode using the current filename, or the default filename
diary if none has yet been specified.
is the unquoted form of the syntax.
Because the output of
diary is plain text, the file does not exactly mirror input and output from the Command Window:
matlab:are shown in plain text. For example, if you enter the following statement
diaryin a console window might produce different results compared to viewing
diaryoutput in the desktop Command Window. One example is using the
\roption for the
fprintffunction; using the
\noption might alleviate that problem.
Command History in the MATLAB Desktop Tools and Development Environment documentation
© 1994-2005 The MathWorks, Inc.