%% Group Data into Specified Number of Bins
% Group random data into three bins. Specify a second output to return the bin edges calculated by discretize.

X = randn(10,1);
[Y,E] = discretize(X,3)

% Copyright 2012 The MathWorks, Inc.