%% Specify Number of Bins
% Distribute 10 numbers into 6 equally spaced bins.

X = [2 3 5 7 11 13 17 19 23 29];
[N,edges] = histcounts(X,6)

% Copyright 2015 The MathWorks, Inc.