How to: Control Histogram bin width
10 views (last 30 days)
Show older comments
Hi
Matlab chooses its own bin width when u use hist().
But I want, for example to make an histogram which makes bins of each 0.5 width. I noticed that hist uses the entire data range as range.
bin_width ( get from edit field)
data=[1:10];
range=max(data)-min(data);
bins= bin_width * range
[n xout]= hist (data, bins)
this still makes random hist where u dont have control over the bins.
what i want is,select the bin_width , 0.5 , plot first bin between 0 - 0.5 , second 0.5- 1 etc.
0 Comments
Accepted Answer
More Answers (1)
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!