Variations on Cross Correlations
9 views (last 30 days)
Show older comments
I need a way to cross-correlate two signals which are not simply lagged copies of each other. The amplitudes are different (even when normalized) and one signal may show peaks where another does not. However, the overall geometry of the two signals should be the same (or rather, I'd like to find the lag(s) at which they overlap the 'best'). I also need to test if the lag changes through time.
For these two reasons, simple cross correlation (xcorr or in time series toolbox) will not work. To address the problem of changing lag, I have used timewindow_corr.m which searches for lags within time windows, as opposed to across the whole series. This seems to work well. I am, however, skeptical of the results because I am ignorant of what the cross correlation is doing to measure the similarity of the signals, which, as described above, have very different forms. I also get different results when using xcorr vs. time-window corr -- xcorr indicates a shift across the entire series; timewindow_corr indicates zero lag for all time windows considered.
Can anyone suggest a method for doing this in MatLab, or even what avenue is worth pursuing? Any help will be greatly appreciated.
Cheers,
T
0 Comments
Answers (1)
Image Analyst
on 11 Jul 2013
Do you want to try normalized cross correlation? It's in the Image Processing Toolbox.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!