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.
not b _not(
not b represents the logical negation of
the Boolean expression
not TRUE = FALSE
not FALSE = TRUE
not UNKNOWN = UNKNOWN
_not(b) is equivalent to
Boolean expressions can be composed of these constants as well
as of arbitrary arithmetical expressions. Typically, equations, such
x = y, and inequalities, such as
x < y, and
<= y, are used to construct Boolean expressions.
Combinations of the constants
UNKNOWN inside a Boolean
expression are simplified automatically. However, symbolic Boolean
subexpressions, equalities, and inequalities are not evaluated and
simplified by logical operators. Use
bool to evaluate such expressions to
one of the Boolean constants. Note, however, that
bool can evaluate inequalities
x <= y and so on only if they
are composed of numbers of type
Type::Real. See Example 2.
The precedences of the logical operators are as follows. If in doubt, use brackets to make sure that the expression is parsed as desired.
not is stronger binding
and, that is,
not b1 and b2 =
b1) and b2.
and is stronger binding
xor, that is,
b1 and b2 or b3 =
and b2) xor b3.
xor is stronger binding
or, that is,
b1 xor b2 or b3 =
xor b2) or b3.
or is stronger binding
==>, that is,
b1 or b2 ==>
(b1 or b2) ==> b3.
==> is stronger
<=>, that is,
b2 <=> b3 =
(b1 ==> b2) <=> b3.
Combinations of the Boolean constants
UNKNOWN are simplified automatically to one
of these constants:
TRUE and not (FALSE or TRUE)
b1 or b2 and (not FALSE)
FALSE or ((not b1) and TRUE)
b1 and (b2 or FALSE) and (not UNKNOWN)
However, equalities and inequalities are not evaluated:
not(x = x) and (1 < 2) and (2 < 3) and (3 > 4)
Boolean evaluation is enforced via
(b1 and b2) or (b1 and (not b2)) and (1 < 2)