Skip to contents

Centres both inputs (subtracts the mean) and divides by the geometric mean of their L2 norms. Returns lags -max_lag .. +max_lag.

Usage

morie_dsp_cross_correlation(x, y, max_lag = NULL)

Arguments

x

Numeric vector.

y

Numeric vector, same length as x.

max_lag

Maximum lag (defaults to length(x) - 1).

Value

Numeric vector of length 2 * max_lag + 1.

References

Rangayyan & Krishnan (2015), Ch. 3, sec. 3.4.