plotting fft with respect to reference signal

I have been using the fft function to analyse the frequency of an accelerator signal, which has proved to be straight forward. However, if I want to analyse the signal with respect to another signal (as shown in the attached), can I do this? Y = fft(log(X1/X0)); where x1 and X0 are an array of values.

 Accepted Answer

You have not described what you want to do and what result you want.
If both signals were acquired at the same times (with the same sampling frequencies and have the same vector lengths), you can do a frequency-domain deconvolution of ‘X0’ and ‘X1’ as:
FX0 = fft(X0);
FX1 = fft(X1);
Y = X1./X0;
To find the phase, use the angle function:
P = angle(Y);
You can then plot the deconvolution ‘Y’ as you would any other fft (link) result.

2 Comments

Thanks that is exactly what I am doing.

Sign in to comment.

More Answers (0)

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!