MATLAB xcorr Function: Algorithm & Orfanidis Textbook

In summary, MATLAB uses the 'xcorr' function to determine the autocorrelation function, which is a Signal-Processing Toolbox function. The calculation of the elements of the auto/cross-correlated can be found on the Mathworks Support Site. However, it is not explicitly referred to as an algorithm. The textbook "Orfanidis, S.J., Optimum Signal Processing. An Introduction. 2nd Edition, Prentice-Hall, Englewood Cliffs, NJ, 1996" is referenced on the MATLAB help page, but it is not readily available online or at libraries.
  • #1
thrillhouse86
80
0
Hey All,

does anyone know what algorithm MATLAB uses to determine the autocorrelation function when you use the 'xcorr' function. the MATLAB help page refers to a textbook:

"Orfanidis, S.J., Optimum Signal Processing. An Introduction. 2nd Edition, Prentice-Hall, Englewood Cliffs, NJ, 1996."

But I can't find a copy of this either online or at my library.

Cheers,
Thrillhouse
 
Physics news on Phys.org
  • #2
Frequently, the Mathworks support site offers more information than the basic usage information provided when you use the HELP <command> command. It looks like xcorr is a Signal-Processing Toolbox function, but that too is handled at the Mathworks Support Site (TIP: bookmark the MATLAB root support site--it helped me a lot when I was a MATLAB developer for a summer):
http://www.mathworks.com/access/helpdesk/help/toolbox/signal/xcorr.shtml

In this case, it tells you how the elements of the auto/cross-correlated are calculated (though I'm not sure if there's a name for this 'algorithm').

Hope this helps!
 
Last edited by a moderator:

FAQ: MATLAB xcorr Function: Algorithm & Orfanidis Textbook

What is the purpose of the MATLAB xcorr function?

The MATLAB xcorr function is used to compute the cross-correlation of two discrete sequences or the autocorrelation of a single discrete sequence. It is commonly used in signal processing, time series analysis, and pattern recognition.

What is the algorithm used by the MATLAB xcorr function?

The algorithm used by the MATLAB xcorr function is based on the fast Fourier transform (FFT) method. It first computes the FFT of the input sequences, multiplies them element-wise, and then performs an inverse FFT to obtain the cross-correlation or autocorrelation sequence.

Can the MATLAB xcorr function handle non-stationary signals?

Yes, the MATLAB xcorr function can handle non-stationary signals. It has the option to use a windowing function, such as a Hamming or Hanning window, to reduce the effects of non-stationarity on the cross-correlation or autocorrelation result.

How does the xcorr function in MATLAB differ from other cross-correlation functions?

The xcorr function in MATLAB differs from other cross-correlation functions in that it is specifically designed for use with discrete sequences and can handle both real and complex data. It also has built-in options for normalization, detrending, and windowing.

Is the MATLAB xcorr function mentioned in any textbooks?

Yes, the MATLAB xcorr function is mentioned in the "Introduction to Signal Processing" textbook by Sophocles J. Orfanidis. It is used as an example in Chapter 7, which covers cross-correlation and convolution in the time and frequency domains.

Back
Top