If you read the help of the hist function you'll find:
N = HIST(Y) bins the elements of Y into 10 equally spaced containers
So that gives you a means to get both the histogram-counts and the centre-position.
From there you need to find the local maxima. That should be rather easy (provided you have no
exact repeat values in N at the local minima), use diff and check where that goes from negative to positive.