When we plot FFT in a matlab it doesn't ask for Frequency , all we need to input the sequence and it simply shows the output using stem command. If i want to compute two different signal using FFT, one with High and the other with Low frequency what should i suppose to do ? and what will be the difference between the two of them ?

Here is simple code for the FFT calculation ,

x=[1 2 1 0]

2 Answers 2


The frequency span of an FFT is determined by the number of samples fed into it and the sample rate of those samples. Basically, the maximum frequency analyzed by the FFT will be half the sample rate. The lowest frequency will be DC, and the remaining output "buckets" will be evenly spaced in frequency up to the (last) max frequency bucket. The number of output "buckets", in the standard implementation, is half the number of input samples.

(Actually, the total number of outputs is equal to the number of input samples, but half the outputs are the imaginary half of complex numbers ... and at about this point my head starts to hurt.)

  • $\begingroup$ As you noted, for an input signal of length $N$, taking its DFT will yield $N$ frequency-domain samples. For a real signal, only half of those contain any information, because the spectrum of a real signal is conjugate-symmetric. However, for a complex time-domain signal, all $N$ values may be distinct and contain usable information. Your note about half of the samples being imaginary is not true; DFT outputs are complex values in general; there is no split between real and imaginary components, except in some rare cases where certain types of symmetry occur in the time domain. $\endgroup$
    – Jason R
    Aug 30, 2012 at 3:54
  • $\begingroup$ @JasonR -- Like I said, that part makes my head hurt. I've only ever used real inputs, and try to keep my fingers out of the details as much as possible -- it think there are snakes or spiders or something in there. $\endgroup$ Aug 30, 2012 at 12:16

FFT is just the implementation of the mathematical formula of DFT, if you want to know something like frequency, try periodogram or see here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.