Re: Graph Fourier Transform
- To: mathgroup at smc.vnet.net
- Subject: [mg78961] Re: Graph Fourier Transform
- From: Mariusz Jankowski <mjankowski at usm.maine.edu>
- Date: Fri, 13 Jul 2007 06:15:55 -0400 (EDT)
- References: <f74sip$8ip$1@smc.vnet.net>
efifer at fas.harvard.edu wrote:
> Hi,
>
> I'd really appreciate some help on how I should graph a Fourier Transform of a
> sin function. I am trying to create a frequency spectra of a sound and have the
> input:
>
> FourierTransform[Sum[ampout[i]*Sin[(2.*3.14159*freq[i])t], {i, 1, 18}], t, ?]
>
> As I am trying to get the continuous Fourier Transform. However the answer this
> gives me is full of dirac deltas, which will plot to zero on a graph:
>
> Plot[FourierTransform[Sum[ampout[i]*Sin[(2.*3.14159*
> freq[i])t], {i, 1, 18}], t, 300], {t, 0, 40}, Axes -> True]
>
>
> Does anyone know how I can manipulate the data to get the major frequencies in
> the sound to show up as peaks on the graph?
>
> Thanks,
> Emily
>
>
Emily, the tradition is to plot impulses as arrows so here is one
solution. there is no need to evaluate the Fourier transform/series of
the signal as it is well known that the result is a superposition of
impulses.
Graphics[Table[Arrow[{{freq[i], 0}, {freq[i], ampout[i]}}], {i, 18}],
Axes -> True, PlotRange -> {{0, 1.1 Max[Table[ampout[i],{i,18}]]}, {0,
1.1 Max[Table[ampout[i],{i,18}]]}}]
If you want a numerical solution then you must sample the signal at more
than twice the maximum frequency (use function Table) and compute the
Fourier transform using Fourier. Use ListPlot and the function Abs to
display the list of Fourier coefficients returned by Fourier.
Hope this helps, Mariusz