Set categories in categorical array
B = setcats(A,newcats)
B = setcats(
sets categories in output categorical arrayA
,newcats
)B
using categories defined bynewcats
and elements defined byA
.
If an element ofA
is in a category listed innewcats
, then the corresponding element ofB
has the same value as inA
.
IfA
has a category not listed innewcats
, thenB
does not have that category. The corresponding elements inB
are undefined.
Ifnewcats
lists a category that is not a category ofA
, thenB
has no elements equal to that category.
To change category names in a categorical array, userenamecats
.