MATLAB Function Reference | ![]() ![]() |
Syntax
diary diary('filename') diaryoff
diaryon
diary filename
Description
The diary
function creates a log of keyboard input and the resulting output (except it does not include graphics). The output of diary
is an ASCII file, suitable for printing or for inclusion in reports and other documents. If you do not specify filename
, MATLAB creates a file named diary
in the current directory.
diary
toggles diary
mode on and off. To see the status of diary
, type get(0,'Diary')
. MATLAB returns either on
or off
indicating the diary
status.
diary('filename')
writes a copy of all subsequent keyboard input and the resulting output (except it does not include graphics) to the named file. If the file already exists, output is appended to the end of the file. You cannot use a filename
called off
or on
. To see the name of the diary
file, use get(0,'DiaryFile')
. Type get(0,'DiaryName')
, and MATLAB returns filename
.
diary
resumes diary mode using the current filename, or the default filename on
diary
if none has yet been specified.
diary filename
is the unquoted form of the syntax.
See Also
Command History window
![]() | dialog | diff | ![]() |