MATLAB: How to use histogram(data, num_bins)

histogram

I have a 8945×1 double array, and I want to view it as a histogram
first try: histogram(data), here's what I get:
second try: using histogram(data, 20):
what am I doing wrong?
data is attached as an excel file if anybody cares to investigate
thanks!

Best Answer

You don't appear to be doing anything wrong. Your data is the problem:
1417.69
521.83
15.23
8.28
7.05
The plot shows exactly what it should: and infinitesimal 1 count at around 1400 and 520, and a gigantic peak at around 0-15 range, since all of your data falls in to that range. Try:
histogram(data(5:end), 20);
and you will be able to see what I mean.