matlab - determine number of bins for histogram -


according link

http://en.wikipedia.org/wiki/freedman%e2%80%93diaconis_rule

and link

https://stats.stackexchange.com/questions/798/calculating-optimal-number-of-bins-in-a-histogram-for-n-where-n-ranges-from-30

function m=histogram_bins(y); m=floor(2*iqr(y))/(length(y)^(1/3)); end 

but data

histogram_bins(z)  ans =      1.5791 

i have tried histogram bins 2 , following picture

enter image description here

but not correct separation,so how can fix it?

let consider following example data see means seperation

histogram_bins(b)  ans =     17.4452   histogram(b,100,18) % dont pay attention 100 

enter image description here


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -