mode

Statistics

Most frequent value in the array. Returns the first mode if there are ties.

Syntax

mode(x)

Examples

mode([1, 2, 2, 3, 3, 3])
▶ Run
mode([1, 1, 2, 2])
▶ Run

See Also

Try SimLab — Free MATLAB® Alternative

466 functions. Runs in your browser. No install.

Open SimLab

Stay Updated

Get notified about new simulations and tools. We send 1-2 emails per month.