FUNCTION REFERENCE
histcounts2
Count pairs of observations in two-dimensional bins.
Count pairs of observations in two-dimensional bins.
Syntax
[N, xe, ye, binX, binY] = histcounts2(X, Y[, n | [nx ny] | xedges, yedges][, 'BinWidth', [wx wy]][, 'Normalization', mode])X and Y must have the same size. N has one row per X bin and one column per Y bin. Bins include their left edge; the final bin includes both edges. NaN pairs are omitted. Normalizations: count, probability, countdensity, pdf, cumcount and cdf.
Example
histcounts2([0.5 1.5], [0.5 1.5], [0 1 2], [0 1 2]) % [1 0; 0 1]Differences from MATLAB: BinMethod and bin-limit options are not supported yet. Automatic edge generation is limited to 65,536 bins per axis; very large floating-point ranges require explicit edges.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.