Multiple delays using cross correlation
이전 댓글 표시
I want to find multiple delays between two signals using xcorr in matlab. I'm getting the single delay when i use the following code [x,lag]=xcorr(r1,r2); [m,i]=max(abs(x)); delay=lag(i); But the problem is i'm not getting correct output, when there are multiple delays. Can anyone help me to find multiple delays between two signals
댓글 수: 2
Wayne King
2011년 12월 19일
You are using max() so you are getting a single value. When you say multiple delays, are you trying to account for echoes?
Can you say something more specific about your signals.
Sravantej
2012년 1월 2일
답변 (1개)
Honglei Chen
2012년 1월 3일
Once you get the result of xcorr, you can use findpeaks to locate multiple peaks.
[x,lag] = xcorr(r1,r2);
[pks, locs] = findpeaks(x);
delay = lag(locs);
For options in findpeaks, see the doc
doc findpeaks
HTH
카테고리
도움말 센터 및 File Exchange에서 Correlation and Convolution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!