Skip to content

removecats

datafun · scripts/datafun/removecats.m

REMOVECATS  Remove categories from a categorical array (MATLAB R2026a compat).

  B = removecats(A)
  B = removecats(A, oldcats)

  With one argument, removes unused categories.  With two arguments, removes
  the named categories (unknown names are ignored).  Elements that belonged
  to a removed category become undefined.