Splitting a vector at the output of the FFT

Hello GNUR’s!

I am a newbie in this community so I may pose a very simple question…
I am trying to split via GUI the output vector of the FFT block in two
halves, one with the upper part and one with the lower part -i.e. I
don’t want a duplicate of the output vector-. Say I have a FFT of 1024
points, how do I split the output into the first 512 points and the
final 512 points? This leads me to the related question of how is the
FFT implemented: is the DC component coming first and then the positive
part of the spectrum with fftSize/2 samples to be finally followed by
fftSize/2-1 of the negative part? Or is it some other way? Moreover, is
it normalized by the number of points?

Thank you very much.

Cheers!

Hi Alejandro,

are you sure you want to use the FFT sinks?
They basically “just” internally put the sample stream into vectors of
fftlen length, then calculate the dB(abs(fft(these vectors))), and
display the result.
What you’re describing sounds more like you’d want to use the
standalone, not-graphical-sink FFT block.

The FFT is defined as most of the time in DSP: each bin corresponds to a
specific exponent in the complex exponential function, ie.
e^(jn_binomega); compare [1].

Greetings,
Marcus

[1]

Thanks for the quick reply!

When I said splitting in the GUI I meant using the flowgraph (instead of
digging into the code) not using the sink FFT. As you say, I am using
the standalone block for the FFT and I want to split its output. Is
there any block to do so or any kind of snippet of code to add in the
fields of the parameters of the subsequent blocks?

Regarding the FFT output now it is much more clear having the actual
implementation info. However, prior to this conversation I remember I
used at the output of the FFT block a vector sink and, interestingly
enough, I saw for a constant source a bin in the middle of the plot (at
index fftSize/2) and when using a cosine with a certain frequency, the
spectrum shifted right but nothing showed up in the “negative”
frequencies. I’ll take a look at it again.

Again, thank you for your time.

Regards,
Alejandro

Hello again,

I still couldn’t figure out how to find a way to split a vector in the
flowgraph (instead of digging into the code).
I am using the standalone block for the FFT and I want to split its
output in halves, meaning at the output of a FFT sized fftSize I want a
vector (size fftSize/2) with the upper half and a vector (size
fftSize/2) with the lower half.
Is there any block to do so or any kind of snippet of code to add in the
fields of the parameters of the subsequent blocks?

Thank you and best regards,
Alejandro

Hi Alejandro,

what about vector to stream, and a deinterleave with block size =
fftlen/2 ?

Greetings
Marcus