mode
Most frequent values.
📝Syntax
M = mode(A)
M = mode(A, d)
[M, F, C] = mode(...)
📥Input Arguments
Parameter Description
A input array.
d dimension to operate along: positive integer scalar.
📤Output Arguments
Parameter Description
M Most frequent values.
F Frequencies of the most frequent values.
C Cell array containing the most frequent values.
📄Description

mode returns the most frequent values of A along the selected dimension.

💡Examples
A = [1 2 2; 3 3 4];
[M, F, C] = mode(A)
🔗See Also
mediansort
Used Functions
mean median std
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub