%% Mode of 16-bit Unsigned Integer Array
% Define a 1-by-4 vector of 16-bit unsigned integers.

A = gallery('integerdata',10,[1,4],3,'uint16')

%
% Find the most frequent value, as well as the number of times it occurs.

[M,F] = mode(A),
class(M)

% M is the same class as the input, A.
% Copyright 2012 The MathWorks, Inc.