Clear the remember table of a procedure
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.
forget(f) clears the remember table of a
clears only remember tables created by the option remember.
Do not call the
forget function for predefined MuPAD® functions.
Many predefined MuPAD functions have special values stored in
their remember tables. The
forget function does
not throw an error when you call it for a predefined MuPAD function.
forget function does not work recursively.
If an inner procedure in a nested procedure uses the option remember, the
does not clear the remember table created for the inner procedure.
If you use the option remember in
a procedure, MuPAD stores all input arguments you used in the
procedure calls as indices of the remember table, and the corresponding
results as values of these entries. For example, create the following
f as a wrapper for the MuPAD
sign function. Use the
option remember to enable the remember
mechanism for the procedure
f := proc(x) option remember; begin sign(x) end:
Now compute the
for the values -1, 0, and 1:
f(-1), f(0), f(1)
unprotect(sign): sign(0):= 1/2:
Although you specified the new value for
sign(0), MuPAD does
not recalculate the result of the function call
Instead, the system returns the result stored in the remember table:
To clear a remember table created by the option
If you assign a value to a function call, calling the
also clears that value:
f(2) := 1/3: f(2)
For further computations, restore the
sign function to its default definition.
ProtectLevelError option to prevent further
Also, delete the procedure
sign(0):= 0: protect(sign, ProtectLevelError): delete f
A procedure or function environment
Void object of domain type