Remove categories from categorical array
B = removecats(
removes
unused categories from the categorical array, A
)A
.
The output categorical array, B
, has the same size
and values as A
. However, B
possibly
has fewer categories.
~ismember(categories(A),unique(A))
returns
logical true
(1
) for any unused
category of A
.
addcats
| categories
| iscategory
| mergecats
| renamecats
| reordercats
| setcats
| summary