Maximal number of elements in the history table
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
The environment variable
the maximal number of entries of the history table at interactive
Possible values: Nonnegative integer smaller than 231.
The commands that are entered interactively in a MuPAD® session, executed in a procedure, or read from a file, as well as the resulting MuPAD outputs are stored in an internal data structure, the history table. Only the most recent entries are kept in memory.
Within a procedure, the maximal
number of entries in the local history table of the procedure is always
independent of the value of
In the following example, we set the value of
Afterwards, only the two most recent inputs and outputs are stored
in the history table at interactive level:
HISTORY := 2: a := 1: b := 2: max(a, b): history(history() - 1), history(history())
The attempt to access the third last entry in the history table leads to an error:
history(history() - 2)
Error: Invalid argument. [history]
restore the default value of
delete HISTORY: HISTORY