[TOC]

mode

Mode

Introduction

The mode of given elements is defined as the element having the highest frequency of occurrence. If there are different elements having same frequencies, the smallest element will be returned. (For complex numbers, the element with the smallest modulus will be return.)

Usages

m = mode(A)

[m,freq] = mode(A)

m = mode(A, k)

[m,freq] = mode(A, k)