Your documentation refers to the function hist()
which bins according to lb < x ≤ ub
. Internally, this function calls histc()
which however bins according to lb ≤ x < ub
. In brief, hist()
adds eps(ub)
, i.e. some margin, to the the upper bounds.
You can simply call histc()
and then plot with bar()
, follows an example:
c = histc(1:0.1:2,[1,2])
bar(c)
you can see that the 2 falls in the second bin, since the bins determined by the edges are [1,2)
and [2,2)
.