categorical.topkrows
categorical: B = topkrows (A, K)
categorical: B = topkrows (A, K, col)
categorical: B = topkrows (A, K, direction)
categorical: B = topkrows (A, K, col, direction)
Top K sorted rows of categorical array.
B = topkrows (A, K) returns the top K rows
of the 2-D categorical array A sorted in descending order as a
group.
B = topkrows (A, K, col) returns the top
K rows of the 2-D categorical array A sorted according to the
columns specified by the numeric vector col, which must explicitly
contain non-zero integers whose absolute values index existing columns in
A. Positive elements sort the corresponding columns in ascending
order, while negative elements sort the corresponding columns in
descending order.
B = topkrows (A, K, direction) returns the
top K rows of the 2-D categorical array A sorted according to
direction, which can be either 'ascend' (default) or
'descend' applying to all columns in A. Alternatively,
direction can be a cell array of character vectors specifying
the sorting direction for each individual column of A, in which
case the number of elements in direction must equal the number of
columns in A.
B = topkrows (A, K, col, direction)
returns the top K rows of the 2-D categorical array A sorted
according to the columns specified in col using the corresponding
sorting direction specified in direction. In this case, the sign
of the values in col is ignored. col and direction
must have the same length, but not necessarily the same number of
elements as the columns in A.
Source Code: categorical