FUNCTION REFERENCE
countcats
Count defined elements in each category.
Count defined elements in each category.
Syntax
counts = countcats(C); counts = countcats(C,dim)The default dimension is the first nonsingleton dimension. Undefined elements do not contribute to the counts.
Example
countcats(categorical([1;3;2;1;3;1],1:3))Differences from MATLAB: dim must be 1 or 2.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.