I need to use the discrete Fourier transform for function that represented as list of values.
I started with an easy task to check my understanding. I tried to get the amplitude values for 2*Sin[x]
. I think they should be somwhere about 2. But using the discrete Fourier
operation produces something quite different. Can someone tell me where my mistakes are?
Here is what I tried.
data = Table[2*Sin[x], {x, 0, 100}];
ListPlot[data, Joined -> True]
ListPlot[Abs[Fourier[data]], Joined -> True, PlotRange -> All]
ListPlot[
Table[Abs[FourierTransform[2*Sin[x], x, w]] /.
DiracDelta -> DiscreteDelta, {w, 0.1, 10, 0.1}],
Joined -> True,
PlotRange -> All]
How can I get the same results from 'Fourier' as I get from 'FourierTransform'?