Contents Previous Next Subchapters

Saving Output Written in Command Window
Syntax diary
diary(name)
diary("on")
diary("off")
See Also commandio

Description
This function is used to save a file that is a copy of the text printed in the Command window .

diary
toggles on and off the saving of output to the current diary file.

diary("on")
turns on the saving of output to the current diary file. This has no effect if saving of output is already turned on.

diary("off")
turns off the saving of output to the current diary file. This has no effect if saving of output is already turned off.

diary(
name)
sets the current diary file to the one specified by name where name is a character row vector. In addition, it turns on output to the current diary file. The default value for the current diary file is "diary".

Example
If you enter
     diary("MyDiary.txt")
     print "sample diary file"
     diary("off")
O-Matrix will add the text
     sample diary file
at the end of the file MyDiary.txt in the current working directory .