histc
Histogram count with explicit edges.
📝Syntax
N = histc(X, edges)
[N, bin] = histc(X, edges)
N = histc(X, edges, dim)
📥Input Arguments
Parameter Description
X Numeric or logical array.
edges Numeric vector of bin edges.
dim Dimension to operate along.
📤Output Arguments
Parameter Description
N Counts for each edge interval.
bin Bin index for each element of X.
📄Description

histc counts values in bins defined by edges. Values equal to the last edge are counted in the last bin.

💡Examples
[N, bin] = histc([0 1 1.5 2], [0 1 2])
🔗See Also
histcounts
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub