Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Discrete Fourier Transform Frequency

  1. Mar 13, 2010 #1
    Hi everybody,

    I'm in the process of writing a discrete Fourier transform program using the algorithm on the DFT wikipedia page. When I throw in functions that I know the frequency domain signal of it gives the predicted shape but I have absolutely know idea how to generate a frequency axis.

    Does anybody here know how I can compute the frequency values?

    Thanks in advance.

  2. jcsd
  3. Mar 14, 2010 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    Try using a sine function at a specific frequency. Then whatever you get for the Fourier Transform corresponds to that frequency.
  4. Mar 14, 2010 #3


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The DFT gives you N evenly spaced samples of the DTFT (discrete-time Fourier transform). The frequencies corresponding to these samples are

    [tex]\frac{n}{N} F_s[/tex]

    where [itex]n = 0,1,\ldots,N-1[/itex] are the indices of the samples, and [itex]F_s[/itex] is the sampling frequency of the input sequence.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook