# How do I get this Fourier transform?

In the image, the signal is a pseudorandom sequence with values oscillating between -1 and +1. It is periodic (in this case with period 0.001). I don't see how the sequence yields a fourier transform whose real and imaginary parts are given on the right side.

Any help on how to compute this would be really appreciated.

• But it does. So, where do your doubts arise from? It's not really like there's any room for interpretation – the FT (here, since we're talking about sequences: DTFT or DFT?) is well-defined. May 23 at 23:03
• It does? What I did was put a bunch of these back-to-back and took the FFT on MATLAB. I don't get distinct peaks such as the ones shown in the right. My DSP knowledge isn't particularly good. Any hints to achieve what has been done in the picture? May 23 at 23:10
• How many is "a bunch"? If you double that number, does your result get any closer to what you see on the right side of that picture? Any finite number will have artifacts introduced compared to the analytical solution. Using a longer sequence may reduce the impact of those artifacts, but it may really take a very long sequence to yield anything close to distinct peaks. May 24 at 5:29
• Paddy, it seems like you're confused about what the (continuous) Fourier transform is, and what the fft computes. It's not the same. So what you're expecting isn't the case.
– mmmm
May 24 at 8:33
• I took over 20 of these sequences, put it back to back and then took the FFT. I was however looking at the wrong section of the fft and hadn't done an fftshift which was messing things up. I am getting something similar to the right side now. Thanks May 24 at 16:11

You did not specify what sampling frequency you used to compute Fourier Transform. Software like MATLAB/GNU octave are only simulating an analog signal with high enough sampling rate. As a very general rule of thumb, if you know that time domain signal has a high periodic component of 1KHz, a 10x sampling frequency will give comprehensive results.

The pseudo-random waveform you showed on the left is a real and periodic signal and so we see real part of the FT is even-symmetric and imaginary part is odd-symmetric essentially meaning you can drop the left half plane from FT and focus on frequency values greater than zero. If you choose a sampling frequency correctly, magnitude response of the FT should show you peaks on frequencies which have the major share in your time domain signal e.g. 1KHz and 3KHz cosine signals may makeup (of course along with many smaller contributions from other cosine signals) the waveform. The real and imaginary parts are useful to compute the phase plot from FT essentially telling you how much delay should be added to cosine signals in order to make an approximation of your time-domain waveform.

What I did was put a bunch of these back-to-back and took the FFT on MATLAB

That sounds like you made you signal periodic. That explains the zeros in your FT. If you put 4 of these "back to back" only every fourth sample of the FFT will be non-zero. That's a basic property of the Fourier Transform.