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.
S = getlevels(A)
S = getlevels(A) returns the levels for the categorical array A. S is a vector with the same type as A.