compare two Vectors or two Matrices for equality
Equal(A, B, c)
Matrix or Vector
(optional) equation of the form compare=method where method is one of 'entries', 'structure', or 'all'; type of comparison to make
In any call to Equal(..), A and B must be the same type (both Matrices or both Vectors). Otherwise, Equal(..) returns false.
The Equal(A, B) function returns true if A and B are the same type, have the same dimension, and have equal component-wise data. In particular, if A and B are Vectors, they must also have the same orientation.
Since compare='entries' is the default comparison method, Equal(A, B) and Equal(A, B, compare='entries') are equivalent.
For Matrices, the Equal(A, B, compare='structure') function returns true if A and B have the same dimension, datatype, shape, storage, attributes, and order.
For Vectors, the Equal(A, B, compare='structure') function returns true if A and B have the same dimension, datatype, shape, storage, attributes, and orientation.
The compare='structure' method does not consider the value of the entries in the Matrices or Vectors in its comparison.
The Equal(A, B, compare='all') function is equivalent to the logical AND of compare='entries' and compare='structure'.
This function is part of the LinearAlgebra package, and so it can be used in the form Equal(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[Equal](..).
Download Help Document
What kind of issue would you like to report? (Optional)