|GNU Octave Manual Version 3|
by John W. Eaton, David Bateman, Søren Hauberg
Paperback (6"x9"), 568 pages
RRP £24.95 ($39.95)
33.4.11 Diary and Echo Commands
Octave's diary feature allows you to keep a log of all or part of an interactive session by recording the input you type and the output that Octave produces in a separate file.
- Command: diary options
- Create a list of all commands and the output they produce, mixed
together just as you see them on your terminal. Valid options are:
- Start recording your session in a file called ‘diary’ in your current working directory.
- Stop recording your session in the diary file.
- Record your session in the file named file.
Without any arguments,
diarytoggles the current diary state.
Sometimes it is useful to see the commands in a function or script as they are being evaluated. This can be especially helpful for debugging some kinds of problems.
- Command: echo options
- Control whether commands are displayed as they are executed. Valid
- Enable echoing of commands as they are executed in script files.
- Disable echoing of commands as they are executed in script files.
- Enable echoing of commands as they are executed in script files and functions.
- Disable echoing of commands as they are executed in script files and functions.
If invoked without any arguments,
echotoggles the current echo state.
- Built-in Function: val = echo_executing_commands ()
- Built-in Function: old_val = echo_executing_commands (new_val)
- Query or set the internal variable that controls the echo state.
It may be the sum of the following values:
- Echo commands read from script files.
- Echo commands from functions.
- Echo commands read from command line.
More than one state can be active at once. For example, a value of 3 is equivalent to the command echo on all.
The value of
echo_executing_commandsis set by the echo command and the command line option
|ISBN 095461206X||GNU Octave Manual Version 3||See the print edition|