# Scaling the output of Discrete Fourier Transform

1. Jul 17, 2011

### wil3

I have a feeling this question has a very simple answer, yet I cannot find it anywhere online.

Let's say that I have a data set that represents and evenly-spaced sample of a function, taken uniformly over the interval $$(a,b) \qquad a,b \in \mathbb{Z}$$

I perform a discrete fourier transform to map this function within the frequency domain. In the computer program I am using, I get a list of values, but not the frequencies at which they occur. What is the appropriate interval to scale these values over, such that the position along the horizontal axis will give me the correct frequency of the mode. I would like to be able to read off resonant modes from peaks on the graph.

For example, let's say I use Mathematica to do a DFT on 100 evenly spaced samples of Sin[x] over the range $$[0, 3\pi]$$. My output will be just a list of values, but I will not know where those values out to occur (ie, I need to know how the bounds of the domain of the input function transform)

Thanks for any help.

Last edited: Jul 17, 2011
2. Jul 17, 2011

### rbj

first of all, think of the DFT as a mapping of one discrete and periodic function (so it is fully described by N numbers, if N is the period) in the "time" domain to another periodic and discrete function (that also has period N, so it is fully described by N numbers) in the "frequency" domain.

so, when you use the DFT to perform a Fourier Transform analysis, you are doing two approximations. first you are limiting the support for your input function to a finite time (or distance/space or whatever is the independent variable). then you are sampling. if you do this with the Fourier integral, first set the integral limits to finite values (but large enough to include the whole input function, or enough of it), then sample it which is like using a Riemann summation to represent your integral. then you will see the scaling constants come out when you see that the Riemann sum is the same as your DFT sum, but for those scaling constants.

anyway, if your sampling frequency is fs and the DFT size is N, then the spacing, in frequency, of the DFT bins is fs / N. doing this Riemann summation thing will show that.

3. Jul 18, 2011

### wil3

Thank you very much for your reply. I understand that the DFT is a discrete approximation, but I do not understand what the "bins" represent. For example, if I transform a sine wave sampled 100 times over the interval [0,5], I will get a list of values. What is the correct domain that these values occur over?

I'll reiterate: I'd like to be able to plot my output DFT values in such a way that if I see a peak, and then look at the explanatory axis, I will see the resonant mode (a frequency) at which said peak occurs in the original signal. The program I use gives me the values(responses) of the DFT, but not the locations at which they occur. So if I see a peak in the output, I'll go "hey cool, there' a peak at 40, so there's clearly a 40 hz sinusoid in the signal"

I'll try to do the Reimann sum out and see if I understand it better.