categories
List of categories in categorical array
Description
C = categories(
returns a list of the
categories in the categorical array A
)A
. The output is a cell array
of character vectors.
The output lists all categories in A
, including categories that
are not present in any element of A
. To return a list that
includes only the categories that are present in elements of A
,
use the unique
function.
Examples
Input Arguments
Tips
The order of the categories listed in
C
is the same order used by functions that you can call onA
, such assummary
andhistogram
. To change the order of the categories, usereordercats
.
Extended Capabilities
Version History
Introduced in R2013bSee Also
categorical
| unique
| addcats
| removecats
| iscategory
| mergecats
| renamecats
| reordercats
| histogram
| setcats