- #1
Jezza
- 37
- 0
Homework Statement
The (computing) task at hand is to take a function [itex]f(x)[/itex] defined at [itex]2N[/itex] discrete points, and use the Discrete Fourier Transform (DFT) to produce [itex]F(u)[/itex], a plot of the amplitudes of the frequencies required to produce [itex]f(x)[/itex]. I have an array for each function holding the value of each function at each value of [itex]x[/itex].
I have 2 questions:
1) Does it make sense to talk of a continuous frequency space when we start with a discrete real space? i.e. Can I let [itex]u[/itex] take any value or should it only take values corresponding to functions with integral periods?
2) What should the domain of [itex]F(u)[/itex] be?
Homework Equations
The 1D Fourier transform of a function [itex]f(x)[/itex] can be approximated as a sum over discrete values:
[tex]
F(u) = \frac{1}{2N} \sum_{x=-N}^{N-1} f(x) e ^{\frac{\pi i x u}{N}}
[/tex]
The Attempt at a Solution
[/B]
Allow me to explain my intuition on what's going on, and please put me right on it if I'm wrong!
If we choose to plot [itex]f(x)[/itex] on a continuous [itex]x[/itex] axis, then due to the discrete, array, representation of it, we will see vertical discontinuities, or steps, between each successive value of the function. Each step will be an arbitrary constant width [itex]\delta[/itex] which would be decided at the plotting stage.
As such, when we use the Fourier transform, we find the amplitudes of the square waves of each frequency which make up the original function [itex]f(x)[/itex]. Because [itex]f(x)[/itex] is only defined over a space of [itex]2N[/itex] points, we can say that the maximum period of any function is [itex]2N\delta[/itex] in the continuous space, or [itex]2N[/itex] in the discrete space. To say that a wave has a frequency [itex]\nu[/itex] is to say it has a period [itex]\frac{2N\delta}{\nu}[/itex] in the continuous space, or [itex]\frac{2N}{\nu}[/itex] in the discrete space.
Now my attempts at answers:
1) Upon plotting [itex]F(u)[/itex] with a continuous [itex]u[/itex] I see no discontinuities, so I suppose then it does make sense, but then I'm really not sure. My hesitation is because an arbitrary real-valued [itex]u[/itex] would not generally be exactly representable in the discrete space, and would have to represented by the nearest one that is.2) I have a few thoughts on this:
a) The maximum frequency representable in the discrete space is N. My logic is that the maximum frequency square wave on a discrete space is of the following form:
{..., a, 0, a, 0, a, 0, a, 0, ...}
where a is the wave's amplitude. A higher frequency would have to have adjacent 'a's and '0's, and would therefore be indistinguishable from a lower frequency in the discrete space. The conclusion is that the domain should be [0:N]
b) I have tried a few plots of [itex]F(u)[/itex]. I've tried with [itex]f(x) = 1[/itex] for [itex]-6<x<5[/itex] and 0 otherwise. I see that the plot is periodic with period [itex]2N[/itex] and with vertical axes of symmetry at integer multiples of [itex]N[/itex]. This seems to support my conclusion in (a). I attach one of my plots of [itex]|F(u)|[/itex] for this [itex]f(x)[/itex]. This was plotted with [itex]N=250[/itex] with (effectively) continuous [itex]u[/itex].
c) If the inclusion of non-integral frequencies that are not representable on the discrete space is allowed, then this renders my argument in (a) irrelevant, because we're not worrying about whether the frequency can be represented on the discrete space.
Thank you to anyone who takes the time to read this. I hope I've made my thoughts clear and explained what I mean well enough!