I have 2 signals of different lengths where the shorter signal is the same as the longer n samples shifted. I want to find the maximum normalized cross-correlation between these two signals. Since it is normalized should give 1. The xcorr
function lags vary from -441 to 441 samples.
This will be used for slightly different signals later on, but for now I'm trying with equal signals.
Zero-padding (as I've done in the image) gives me a wrong correlation since the zeros become a part of the correlation calculation.
Any ideas how to accomplish this?
xcorr(A(A~=0), B(A~=0))
- rstfind(..., 'first')
andflip(...)
- rst