Count the most frequently appearing value.
modecounts the frequency along the first non-singleton dimension and if two or more values have te same frequency returns the smallest of the two in m. The dimension along which to count can be specified by the dim parameter.The variable f counts the frequency of each of the most frequently occurring elements. The cell array c contains all of the elements with the maximum frequency .