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
returns counts of the number of elements in the nominal or ordinal array
C = levelcounts(A)A equal to each possible level in A.
If
Ais a vector, thenCis a vector containing as many elements as the number of levels inA.If
Ais a matrix, thenCis a matrix of column counts.If
Ais an N-dimensional array, thenlevelcountsoperates along the first nonsingleton dimension.
Examples
Input Arguments
Version History
Introduced in R2007a