Contents Previous Next Subchapters

Checking For Matrix Equality
Syntax isequal(xyz...)
See Also equal , any , all

Description
Returns true if the dimensions of all the arguments are equal and the corresponding elements are equal, otherwise isequal returns false. The arguments can be logical, character, integer, real, double-precision, or complex matrices. If the arguments do not have the same type, values will be coerced to match before the comparison is made.

Example
     x = {[1, 2], [3, 4]}
     y = {[1, 2], [4, 4]}
     print isequal(x, x) , isequal(x, y)
returns
     T F

Reference
This is a more general version of the equal function and it is faster because it is an intrinsic function.