) &lt;= v &lt; edges(q+1).
 h(nBins) additionally contains the weighted count of values in A such
 that v==edges(nBins+1) -- which is different then how histc treates the
 boundary condition. Finally, h is normalized so that sum(h(:))==1.

 It usually makes sense to specify edges explicitly, especially if
 different histograms are going to be compared.  In general, edges must
 have monotonically non-decreasing values.  Also, if the exact bounds are
 unknown then it is convenient to set the first ele