histcounts
datafun · scripts/datafun/histcounts.m
HISTCOUNTS Histogram bin counts (MATLAB compat).
[N, edges] = histcounts (X)
[N, edges] = histcounts (X, edges)
[N, edges] = histcounts (X, nbins)
[N, edges] = histcounts (X, 'BinWidth', w)
[N, edges] = histcounts (X, 'BinLimits', [lo hi])
[N, edges] = histcounts (X, 'BinMethod', method)
[N, edges, bin] = histcounts (...)
Default / NumBins edge placement follows MATLAB R2026a (automatic
"nice" widths, integers rule for integer-valued samples, and the
constant-data half-integer cover).