I am new to much of Matlab and signal processing, but would like to know if the Matlab function xcorr automatically zero-pads the two input vectors (in real life these would be two vectors of sampled data) to negate the end effects that usually occur when performing discrete Fourier Transforms, or in this case the discrete FFT.
No products are associated with this question.
Hi, xcorr() does pad the DFT of the input vectors to the length
where M is the greater length of the two input vectors. So in the case of autocorrelation, that is clearly the length of the input vector.
In the case of cross correlation with different length vectors, M is the length of the longest vector and the shorter vector is appended with zeros in the time domain before computing the DFT.