Computes mode of statistical data.


Updated 3 Jun 2005

No License

MODE statistical mode of an array
MODE(X) returns the most frequent element(s) of array X. X can be charracter array or cell array of strings.

Example: mode([3 9 4 2 3 2]) returns [2;3]

Cite As

Mukhtar Ullah (2023). MODE (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Matrices and Arrays in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Extended to support charcter arrays or cell arrays of strings.