Comparing two non periodic signals (signal shift)

13 visualizaciones (últimos 30 días)
salah
salah el 20 de Nov. de 2014
Comentada: salah el 20 de Nov. de 2014
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

Respuestas (1)

Ahmet Cecen
Ahmet Cecen el 20 de Nov. de 2014
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)))));
  2 comentarios
salah
salah el 20 de Nov. de 2014
I will try it. Thank you Ahmet
salah
salah el 20 de Nov. de 2014
I tried that but this error appears.
*( Undefined function 'fft' for input arguments of type 'char'.
Error in shift2 (line 9) X=(ifft(fft(A).*conj(fft(B))));)*

Iniciar sesión para comentar.

Categorías

Más información sobre Large Files and Big Data en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by