Hi,
I have been using Fourier function in Mathematica to determine the DFT of a signal, however I found that the result are inaccurate than the expected result. Suppose that I want to determine the coefficient of sin(x) at fundamental frequency, which should gives -0.5i.
My code is :
Part[Fourier[Table[Sin[2*Pi*100*t/100000], {t, 100000}],
FourierParameters -> {1, -1}], 101]/100000
However, the answer Mathematica gave is 0.00314157 - 0.49999i. The result are getting more closer to -0.5i if I increase the number of samples. Is there any other way to use Fourier function to get accurate result?
I noticed that there are several other function in Mathematica that can do the trick such as FourierCoefficient and FourierSeries. However this function becomes stuck with my complicated trigonometric terms. In Matlab I simply used FFT function and it works. Any solutions?
Thanks, Syed