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.
Use only in the MuPAD Notebook Interface. This functionality does not run in MATLAB.
Three types of mathematical properties are available in MuPAD®:
Basic number domains, such as the domain of integers, the domain of rational numbers, the domain of real numbers, the domain of positive real numbers, or the domain of complex numbers
Intervals in basic number domains
Residue classes of integers
Often, there are several equivalent ways to specify a property.
For example, >= 0
, Type::NonNegative
, and Type::Interval([0],
infinity)
are equivalent properties. Similarly, Type::Odd
is equivalent
to Type::Residue(1, 2)
.
Some members of the Type
library do not correspond
to mathematical properties, for example, Type::ListOf
.
This table shows some examples of how to set properties on the
identifier or expression expr
.
If expr
is a list, vector, or matrix, then
only the syntax (expr, set)
is valid. Do not use
the syntaxes (expr in set)
or relations, such as expr
> 0
or expr < 0
, for nonscalar expr
.
Property | Recommended
Way to Specify a Property of expr | Alternative Way to Specify a Property of expr |
---|---|---|
Real value, |
| ( |
Imaginary value, |
| ( |
Complex value, |
| ( |
Integer value, |
| ( |
Rational value, |
| ( |
Positive value, |
| ( |
Negative value, |
| ( |
Nonnegative value, |
| ( |
Zero, {0} |
| ( |
Nonzero value, |
| ( |
Even value, |
| ( |
Odd value, |
| ( |
Positive integer value, |
| ( |
Negative integer value, |
| ( |
Nonnegative integer value, |
| ( |
Positive rational value, |
| ( |
Negative rational value, |
| ( |
Nonnegative rational value, |
| ( |
Here, |
|
|
Here, |
|
|
Here, |
|
|
Here, |
|
|
b ℤ + a Here, |
|
|