Documentation Center

  • Trial Software
  • Product Updates


Class: categorical

True if categorical arrays are equal

The nominal and ordinal array data types might be removed in a future release. To represent ordered and unordered discrete, nonnumeric data, use the MATLAB® categorical data type instead.


TF = isequal(A,B)
TF = isequal(A,B,C,...)


TF = isequal(A,B) is true (1) if the categorical arrays A and B are the same class, have the same size and the same sets of levels, and contain the same values, and false (0) otherwise.

TF = isequal(A,B,C,...) is true (1) if all the input arguments are equal.

Elements with undefined levels are not considered equal to each other.

See Also

Was this topic helpful?