Skip to content

setcats

datafun · scripts/datafun/setcats.m

SETCATS  Set categories of a categorical array (MATLAB compat).

  B = setcats (A, newcats)

  Categories of B are exactly newcats (in that order).  Elements of A
  whose category appears in newcats keep that value; elements whose
  category is omitted become undefined.  Categories listed in newcats
  that are not present in A are unused but retained.