What is the automatic binning algorithm used in MATLAB's histogram function?

时间:2018-03-25 18:47:39

标签: matlab histogram binning

An automatic binning algorithm was used in the default bin selection of the histogram function in MATLAB. On the documentation however, there is no mention of the reference material/publication used for implementing this. What is this algorithm?

1 个答案:

答案 0 :(得分:1)

The documentation says:

hist(x) creates a histogram bar chart of the elements in vector x. The elements in x are sorted into 10 equally spaced bins along the x-axis between the minimum and maximum values of x.

So if we assume that x is sorted then the bounds of the bins are given by the vector

 x(1) + (1:9)./10 * (x(end)-x(1))
相关问题