Undefined value

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.


undefined indicates results of mathematically undefined operations.

MuPAD® uses the special value undefined to indicate the results of operations that are not defined in mathematics.

You can use the undefined value as an input. Arithmetical operations involving undefined also return undefined. Multiplying infinities by 0 returns undefined.

For floating-point values, MuPAD uses the special value RD_NAN instead of undefined. If you use typeset mode, MuPAD displays RD_NAN as NaN in output regions. Multiplying infinities RD_INF and RD_NINF by 0 returns RD_NAN.


Example 1

Perform the following operations with infinities. MuPAD returns the undefined value for these operations:

0*infinity, infinity - infinity, infinity/infinity

Example 2

Compute the limit of the sine function at infinity. Since this limit does not exist (is not mathematically defined), MuPAD returns undefined:

limit(sin(x), x = infinity)

Example 3

Multiply infinities by 0:

infinity*0, -infinity*0