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.
x <> y_unequal(
x <> y defines an inequality.
x <> y is equivalent to the function
<> returns a symbolic
expression representing an inequality.
The resulting expression can be evaluated to
It also serves as control conditions in
while statements. In all these cases,
testing for equality or inequality is a purely syntactical test. For
bool(0.5 <> 1/2) returns
both numbers coincide numerically. Further, Boolean expressions can
be evaluated to
y applying mathematical
The boolean expression
not x = y is always
x <> y.
not x <> y is always
x = y.
In the following example, note the difference between syntactical
and numerical equality. The numbers 1.5 and
numerically. However, 1.5 is
of domain type
of domain type
Consequently, they are not regarded as equal in the following syntactical
1.5 <> 3/2; bool(%)
The following expressions coincide syntactically:
_unequal(1/x, diff(ln(x),x)); bool(%)
The Boolean operator
equalities and inequalities:
not a = b, not a <> b
In this example, use the operator
compare two tables:
bool(table(a = PI) <> table(a = sqrt(2)))
bool(1 <> x/(x + y) + y/(x + y)), testeq(1 <> x/(x + y) + y/(x + y))
Inequalities are typical input objects for system functions,
solve(x^2 - 2*x <> -1, x)
Arbitrary MuPAD® objects
Expression of type