levelcounts
(Not Recommended) Element counts by level of a nominal or ordinal array
The nominal and ordinal array data types are not
        recommended. To represent ordered and unordered discrete, nonnumeric data, use the Categorical Arrays
        data type instead.
Description
C = levelcounts(A)A equal to each possible level in A.
- If - Ais a vector, then- Cis a vector containing as many elements as the number of levels in- A.
- If - Ais a matrix, then- Cis a matrix of column counts.
- If - Ais an N-dimensional array, then- levelcountsoperates along the first nonsingleton dimension.
Examples
Input Arguments
Version History
Introduced in R2007a