renamecats
Rename categories of a categorical array.
Syntax
Section titled “Syntax”B = renamecats(A, oldnames, newnames)B = renamecats(A, newnames)Description
Section titled “Description”Renames categories. With three arguments, renames the named ones. With two arguments, renames every category — newnames must have one entry per category in their canonical order.
Examples
Section titled “Examples”C = categorical({'a','b'});renamecats(C, {'a'}, {'apple'})See also
Section titled “See also”categories— List of category names in a categorical array.reordercats— Reorder the categories of a categorical array.