Function File: d = finddelay (x, y)

Estimate the delay between times series x and time series y by correlating and finding the peak. The index of the peak correlation is returned in d.

Inputs:

  • x, y: signals

Output:

  • d: The delay between the two signals

Example:

x = [0, 0, 1, 2, 3];
y = [1, 2, 3];
d = finddelay (x, y)
d = -2

See also: xcorr.

Package: communications