Method on @sym: isequal (f, g)
Method on @sym: isequal (f, g, …)

Test if contents of two or more arrays are equal.

Example:

syms x
isequal([1 x], [1 x])
  ⇒ 1

Note NaN’s compare as false:

snan = sym(nan);
isequal([1 snan], [1 snan])
  ⇒ 0

To avoid this behaviour, see ‘isequaln’.

Note the type of the arrays is not considered, just their shape and values.

See also: @sym/isequaln, @sym/logical, @sym/isAlways, @sym/eq.

Package: symbolic