isequal
Determine if symbolic inputs are equal
Description
returns
logical tf = isequal(A,B)1 (true) if A and
B are the same size and their contents are of equal value (from a
coding perspective). Otherwise, isequal returns logical
0 (false). isequal does not
consider NaN (Not a Number) values to be equal.
isequal recursively compares the contents of symbolic data structures
and the properties of objects. If all contents in the corresponding locations are equal,
isequal returns logical 1
(true).
returns logical tf = isequal(A1,A2,...,An)1 (true) if all the inputs
A1,A2,...,An are equal.
Examples
Input Arguments
Tips
isequal(A,B)checks ifAandBare the same size and their contents are equal (from a coding perspective). To check whether the conditionA == Bis always mathematically true for all values of variables inAandB, useisAlways(A == B).If one of the input arguments is a symbolic type and the other input is a MATLAB® numeric type with the same value, then
isequalreturns logical0(false) because the inputs do not have the same data type. For example,tf = isequal(1,sym(1))returns0(false).