Count elements/rows
This functions results in absolute and relative frequencies of elements in N-dimensional matrices or rows 2-dimensional matrices.
Example:
Example:
x = [Inf NaN NaN
1 2 3
1 2 -Inf
1 2 -Inf
1 2 3
1 2 5
Inf NaN NaN];
yr = count(x, 'rows')
yr =
1 2 -Inf 2 0.2857
1 2 3 2 0.2857
1 2 5 1 0.1429
Inf NaN NaN 2 0.2857
yr = count(x)
yr =
-Inf 2.0000 0.0952
1.0000 5.0000 0.2381
2.0000 5.0000 0.2381
3.0000 2.0000 0.0952
5.0000 1.0000 0.0476
Inf 2.0000 0.0952
NaN 4.0000 0.1905
Cite As
Elleke Janssen (2026). Count elements/rows (https://www.mathworks.com/matlabcentral/fileexchange/12283-count-elements-rows), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
