Instead of having hist() display the answer, assign it to a variable:
[counts, centers] = hist(....);
then the bin centered around centers(K) occurred counts(K) times.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!