This functionality does not run in MATLAB.
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. E.g.,
<> 1/2) returns
TRUE although both numbers coincide numerically.
The boolean expression
not x = y is always
x <> y.
not x <> y is always
x = y.
In the following, 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(%)
If floating-point numbers are involved, one should rather use
~= instead of
is test whether the
floating-point approximations coincide up to the relative precision
1.5 ~= 3/2; bool(1.5 ~= 3/2); is(1.5 ~= 3/2);
The following expressions coincide syntactically:
_equal(1/x, diff(ln(x),x)); bool(%)
The Boolean operator
equalities and inequalities:
not a = b, not a <> b
The examples below demonstrate how
with non-mathematical objects and data structures:
if "text" = "t"."e"."x"."t" then "yes" else "no" end
bool(table(a = PI) <> table(a = sqrt(2)))
bool(1 = x/(x + y) + y/(x + y)), testeq(1 = x/(x + y) + y/(x + y))
Equations and inequalities are typical input objects for system
functions such as
solve(x^2 - 2*x = -1, x)
solve(x^2 - 2*x <> -1, x)
Arbitrary MuPAD® objects
Expression of type