I am working on a spectrum analyzing simulator, which is meant to compute and plot the FFT of a sine wave carrier signal of $16 Hz$.
From my practicals with a spectrum analyzer, I know that the spike shows up on the $16Hz$ mark. But after computing my own FFT and passing the magnitude of the FFT to a plotter in
Matlab, I get two spikes, one at the beginning and the other at the end.
My sample rate is $2048$ samples per second, and what I plotted was the respective $abs(FFT)$ against a frequency step of $16/2048$. Doing the
fftshift only moves the spike to the $8Hz$ mark and not $16Hz$.
I've tried computing FFT in different programming languages and with different tools (java
jtransform, Matlab, C language, Excel, two java written classes for FFT by different universities).
I dont think my FFT result are wrong, I think it has to do with the plotting. I do not understand why my plot does not look like it would in real life. From my description and information, can you see any problems that would cause my plot to be wrong?