Autocorrelation plot inconsistency for early lags
3 views (last 30 days)
Show older comments
Hello MATLAB community,
Background:
I'm having a problem using the xcorr function to auto-correlate signals from light scattering experiments. I'm using a Basler Pilot (2D CCD) Camera to capture intensities of light scattering. So I use the following to calculate the auto-correlation of each line, or row, of the 2D data.
for k = 1:h
line = frame(k,:);
lineCorr(k,:) = xcorr(line, 'coeff');
end

As you can see in the figure, the correlation looks pretty good, but zooming into the auto-corr for early lags (on the right), you can see there's an inconsistency of the auto-corr function.
Question:
Is there some sort of default behavior of the 'coeff' option in the xcorr function? I understand that it automatically sets the zero lag correlation to 1, but why does it effect the early lags of the correlation function as well?
Possible Solution:
Would it be better to just do a normal auto-correlation (i.e. use no options in the xcorr call), and normalize afterwards?
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!