Comparing two non periodic signals (signal shift)
조회 수: 12 (최근 30일)
이전 댓글 표시

Hi guys, My name is Salah, I have two non periodic signals and im trying to find the shift between them using matlab. the signals are from spectrometer. I attached excel file that contains two signals and photo for them
Thanks Salah
댓글 수: 0
답변 (1개)
Ahmet Cecen
2014년 11월 20일
Import your signals as A and B using the wizard. Also import the time information (x-axis) as T.
X=(ifft(fft(A).*conj(fft(B))));
shiftindex=find(X==max(X));
shift=T(shiftindex)-T(1); % This is the time value of the shift.
Also check below for a plot of the shifted signal and comparison.
figure
plot(A);
hold on;
plot(circshift(B,(find(X==max(X)))));
참고 항목
카테고리
Help Center 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!