FFT is not giving the expected results in MATLAB

78 views Asked by At

I am trying to convert a FID (free induction decay) signal from time domain to frequency domain to visualize a NMR spectra. I am capable of opening the file with specialized software such as MESTRENOVA. The resulting spectra should look like this:

NMR expected result NMR expected result

However, when I try applying the FFT in MATLAB, the resulting spectra looks different, kind of dividedin two. I have little experience with this, so maybe I am missing something theoretical while applying the fourier transform. To do so, I apply it as follows:

figure(1)
plot(fid_signal)

FID spectra in MATLAB

signal = flipud(fid_signal); %I flip it because it is how it looks in MESTRENOVA
spectrum = fft(signal);

figure(2)
plot(abs(spectrum))

Resulting spectra from the fft

Maybe someone can help me on how to apply the fourier transform correctly on MATLAB? Or maybe some further processing is needed that I am missing?

1

There are 1 answers

0
Jim Quirk On
signal = fliplr(fid_signal); %flipud doesn't really matter. but fliplr gets time in the correct direction
spectrum = fftshift(fft(signal));
figure(2);
plot(abs(spectrum));