Determine and count unique values of an array

Very fast function to determine and count unique values of numeric, logical, char, cell arrays.

Download
Download

You are now following this Submission

Cite As

Anthony Kendall (2026). Determine and count unique values of an array (https://www.mathworks.com/matlabcentral/fileexchange/23333-determine-and-count-unique-values-of-an-array), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.5.0

Speed improvement for large integer arrays.

Download
1.4.0

Added check for arrays with large values but few elements, which are not well-suited to accumarray, at suggestion of user.

Download
1.3.0

Further modifying description, correcting an error.

Download
1.2.0

Added more thorough description and examples, in response to user comment.

Download
1.1.0

An improvement to make code more general.

Download
1.0.0

Download