필터 지우기
필터 지우기

need help with cross correlation output. not out putting the correct position.

조회 수: 4 (최근 30일)
Raymond Ng
Raymond Ng 2017년 12월 8일
편집: Raymond Ng 2017년 12월 8일
Hello, I have a cross correlation code written that uses findpeaks to locate positions of the high correlated signals in the waveform. My problem is when I plot my EQ output my results are completely random (visually where the highly correlated signals (very obviously seen) are not aligned. Where did I go wrong? Manually checking is not always an option since this is a piece of a much larger code where I have several hundreds 'D' data and thousands of 'T' templates to cross correlate.
D= DATA(1x360000)
T=D(2001:5000); %some small signal
nt1=length(T);
for i= nt1:(nt-nt1)
cc(i)=(max(xcorr(T,D(i:i+nt1-1), 1, 'coeff')));
end
[pks,loc]=findpeaks(cc,'MinPeakDistance',300,'MinPeakHeight',.5);
clear EQ
count=0;
for eqpk=(1:length(loc))
count=count+1;
EQ{count}=D((loc(eqpk)-100: loc(eqpk)+200));
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by