Indicate a failed computation
MuPAD® notebooks will be removed in a future release. 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.
FAIL is a keyword of the MuPAD® language.
Many functions of the library use the return value
indicate failed computations or non-existing elements.
FAIL is used as the return value for computations
that failed. Also, requesting non-existing slots of domains or function environments yields
Due to this behavior, library functions can try computations without
A function should return
FAIL or an error
if at least one of its inputs is
The following attempt to convert
an integer of a residue class ring must fail:
poly(sqrt(3)*x, [x], Dom::IntegerMod(3))
The following matrix is not invertible. You can try to invert it without producing an error:
A := matrix([[1, 1], [1, 1]]): 1/A
Most functions return
FAIL or an error on
Error: Arithmetical expression expected. [sin]
FAIL evaluates to itself:
FAIL, eval(FAIL), level(FAIL, 5)