- #1
GhostLoveScore
- 149
- 9
I am trying to do Fast Fourier Transform on some data recorded from RTL SDR. I managed to write a program that does that, but the problem is this. This is final result as it should look
And this is my result
It may be hard to understand this, I'll try to explain. My graph is done using 5000 samples. At upper graph, see that vertical line at around 99.4 MHz? That's the same line as at 3500 at lower graph. And if you look closely at lower graph, you can see that it really should be cut vertically at 2500 and left and right side switched.
I understand that when doing Fourier Analysis using N samples, as a result we get N frequency bins. And the result looks like this
1,2,3,4,5,6...N/2,N/2...6,5,4,3,2,1
So in a way I understand why I need to have right and left half of my graph switched. The result would look like this
N/2,..., 6,5,4,3,2,1,0,1,2,3,4,5,6,...,N/2
And the graph looks like this
What I don't understand is why the bins N/2 - N are not mirror image of bins 0 - N/2. And what I am doing here, switching bins N/2 - N to the left and bins 0 - N/2 to the right is the correct way to do this?
I forgot to say that data that I used for input was complex data.
And this is my result
It may be hard to understand this, I'll try to explain. My graph is done using 5000 samples. At upper graph, see that vertical line at around 99.4 MHz? That's the same line as at 3500 at lower graph. And if you look closely at lower graph, you can see that it really should be cut vertically at 2500 and left and right side switched.
I understand that when doing Fourier Analysis using N samples, as a result we get N frequency bins. And the result looks like this
1,2,3,4,5,6...N/2,N/2...6,5,4,3,2,1
So in a way I understand why I need to have right and left half of my graph switched. The result would look like this
N/2,..., 6,5,4,3,2,1,0,1,2,3,4,5,6,...,N/2
And the graph looks like this
What I don't understand is why the bins N/2 - N are not mirror image of bins 0 - N/2. And what I am doing here, switching bins N/2 - N to the left and bins 0 - N/2 to the right is the correct way to do this?
I forgot to say that data that I used for input was complex data.
Last edited: