about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/KPMstats/chisquared_histo.m
blob: 1b64933560d4af08cc353c707e6eaddd24b3bce1 (plain)
1
2
3
4
5
function s = chisquared_histo(h1, h2)
% Measure distance between 2 histograms (small numbers means more similar)
denom = h1 + h2;
denom = denom + (denom==0);
s = sum(((h1 - h2) .^ 2) ./ denom);