
Controlling Output
Printing Comman
d Window Contents
To print the comp
lete contents of the Command Window, select File > Print.
To print only a se
lection, first make the selection in the Command Window
and then select F
ile > Print Selection.
Specify printi
ng options for the Command Window by selecting File > Page
Setup. For exam
ple, y o u can prin t with a h eader. For m ore information, se e
“Printing and P
age Setup Options for Desktop Tools” on page 2-52.
Keeping a Sessi
on Log
The diary Function
The diary func
tion creates a copy of your MATLAB session in a disk file,
including key
board input and system responses, but excluding graphics. You
can view and ed
it the resulting text file using any text editor, such as the
Editor/Debu
gger. To create a file on your disk called
sept23.out that contains
all the funct
ions you enter, a s w ell as MATLAB output, enter
diary('sept23.out')
To stop recor
ding the session, use
diary('off')
To view the fil
e, run
edit('sept23.out')
Other Session Logs
There are two other means of viewing session information:
• T he Command History window, which contains a log of all functions
executed in the current and previous sessions.
• The
logfile startup option — see “Startup Options” on page 1 -12.
3-33
Commentaires sur ces manuels