setcats
Set categories in categorical array
Syntax
Description
B = setcats( sets
categories in a categorical array. The output array A,newcats)B has the
categories specified by newcats and elements that correspond to
the elements of the input array A.
If an element of
Ais in a category listed innewcats, then the corresponding element ofBhas the same value as inA.If
Ahas a category not listed innewcats, thenBdoes not have that category. The corresponding elements inBare undefined.If
newcatslists a category that is not a category ofA, thenBhas no elements equal to that category.
Examples
Input Arguments
Tips
To change category names in a categorical array, use
renamecats.
Extended Capabilities
Version History
Introduced in R2014b
See Also
categories | removecats | iscategory | mergecats | renamecats | reordercats | addcats