howmany Counts occurrencies of numbers in array

Counts the number of occurrences of finite values
570 Downloads
Updated 4 Nov 2009

View License

% [val, num] = howmany(x)
%
% counts the number of occurrences of finite values in x
%
% in: x vector of nnumbers (array will be reshaped to a vector)
%
% out: val unique values in x, sorted
% num number of occurrences

Cite As

Pekka Kumpulainen (2024). howmany Counts occurrencies of numbers in array (https://www.mathworks.com/matlabcentral/fileexchange/25734-howmany-counts-occurrencies-of-numbers-in-array), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Shifting and Sorting Matrices in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0