%% Histogram of Vector

x = [0 2 9 2 5 8 7 3 1 9 4 3 5 8 10 0 1 2 9 5 10];
hist(x)

% hist sorts the values in x among 10 equally spaced bins between the minimum and maximum values in the vector, which are 0 and 10 in this example.
% Copyright 2015 The MathWorks, Inc.