counts = histcounts(A)
| Parameter | Description |
|---|---|
| A | Input categorical array. |
| Parameter | Description |
|---|---|
| counts | Counts for each category in category order. |
histcounts returns category counts for a categorical array.
The result is equivalent to countcats(A); undefined elements are ignored.
A = categorical({'red','blue','red'}); counts = histcounts(A)
| Version | Description |
|---|---|
| 2.0.0 | initial version |