I am new to Math .net numerics and still trying to understand the FFT library. Based on the some examples, I've written following code:
![Image]()
based on my understanding of FFT, i should get impulse at 200Hz and frequency resolution should be fs/N.
But the peak is coming at 900th sample, which i'm not sure pointing to 200Hz. If my interpretation is correct?
Any help would be appreciated. Thanks in advance.
Complex[] samples = new Complex[1000];
double[] s = Generate.Sinusoidal(1000, 2000.0, 200.0, 10.0);
for (int i = 0; i < 1000; i++)
samples[i] = new Complex (s[i],0);
for (int i = 0; i < samples.Length; i++)
{
chart1.Series["Series1"].Points.AddXY
(i,samples[i].Real);
}
Fourier.Forward(samples,FourierOptions.Matlab);
for (int i = 0; i < samples.Length; i++)
{
chart2.Series["Series1"].Points.AddXY
(i, samples[i].Real);
}

based on my understanding of FFT, i should get impulse at 200Hz and frequency resolution should be fs/N.
But the peak is coming at 900th sample, which i'm not sure pointing to 200Hz. If my interpretation is correct?
Any help would be appreciated. Thanks in advance.