A Hitchhiker's Guide to the FFT

VI. Recovering the Continuous Fourier Transform

Despite all the good results presented in the previous sections, the results
given by the fft are far from looking any close to the actual Continuous
Fourier transform that we are interested in. Hence the term fft
(for Fast Fourier Transform) can be a bit confusing since it does not return
the Fourier Transform but returns the Discrete Fourier Transform instead. When
solving mathematical problems, one is often interested in the Fourier
Transform (and not the discrete Fourier Transform...). Hence the output of the
fft has to be modified in order to approximate the Continuous
Fourier Transform presented in Figure 2.

VI.1 Adaptation of the frequency axis

First of all, according to Section III.1, the frequency axis has to be
scaled to pass from \(k\) to \(\omega\). This can be done by typing:

omega_fft=2*pi*k_fft/P;

But in Figure 2, the frequency values are also ''centred'' around zero. Hence our axis also needs to be centred. This can be done by
typing:

omega_fft_centred=unwrap(fftshift(omega_fft)-2*pi);

Finally, according to Section IV, the frequency axis needs to be
scaled again in order to pass from \(\omega\) to \(\Omega\). In order to do so, we
need some information about the function we want to take the Fourier Transform
of. In particular, we need to know with what sampling interval \(T\) it has been
sampled. If \(T\) is known, we can scale our frequency axis by typing:

The following picture shows the results and shows that yes, it is possible to
approximate a continuous Fourier transform with the Matlab fft routine.
However the procedure is not trivial, and one should think (or read this note!)
before using it.