reordercats
Reorder categories in categorical array
Description
B = reordercats(
reorders the categories in a
categorical array. By default, A
)reordercats
uses alphanumeric
order.
The order of the categories is used by functions such as summary
and
histogram
. If the categorical array is ordinal, the order of
the categories defines their mathematical ordering. The first category specified is
the smallest and the last category is the largest.
Examples
Input Arguments
Tips
To convert the categorical array,
B
, to an ordinal categorical array, useB = categorical(B,Ordinal=true)
. You can specify the order of the categories withB = categorical(B,
, where the order of the values invalueset
,Ordinal=true)
defines the category order.valueset
Extended Capabilities
Version History
Introduced in R2013b
See Also
categories
| addcats
| removecats
| iscategory
| mergecats
| renamecats
| setcats