File Exchange

image thumbnail

TIME-DOMAIN CROSS-CORRELATION FUNCTION

version 1.0 (287 KB) by

xcorrTD takes two discrete time signals as input and calculates cross-correlation and delay

15 Downloads

Updated

View License

xcorrTD takes two discrete time signals as input and calculates cross-correlation values, cross-correlation
coefficients and delay (lag) between two signals. The computation is performed in the time domain. The results of xcorrTD has been validated against the MatLAB's xcorr function.
For cross-correlation in frequency domain see xcorrFD.
Syntax: [lags,ck,cc,td] = xcorrTD(x,y)
Input:
x = input signal 1 (must be a Nx1 or 1xN vector)
y = input signal 2 (must be a Nx1 or 1xN vector)
Output:
lags = a vector of lags with a length of 2xN-1 (N = number of
data points in signal x or y)
ck = cross-correlation values (MatLAB xcorr gives them as
output)
cc = correlation coefficients
td = delay (i.e., number of lags) between two signals

Comments and Ratings (0)

Updates

1.0

Updated description

1.0

Figure updated

MATLAB Release
MATLAB 9.0 (R2016a)

MATLAB Online Live Editor Challenge

Win cash prizes and have your live script featured on our website

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

xcorrTD/