Assuming "A" is a real vector packed (with vDSP_ctoz) in the proper way, doing:
vDSP_fft_zrip(setupReal, &A, 1, FFT_LENGTH_LOG2, FFT_FORWARD);
Will transform my real content to it's frequency representation.
What do then the following values represents ?:
A.realp[0];
A.imagp[0];
A.realp[i];
A.imagp[i];
A.realp[N-1];
A.imagp[N-1];
Actually I'm wondering where is the DC and Nyquist components stored. Also is the A.imagp[j] the imaginary part of A.realp[j] ?
Let H be the vector that is the mathematical result of the FFT, so that Hk is the kth element of the vector. H0 is the DC component, and HN/2 is the Nyquist component. Then:
A.realp[0]
contains H0.
A.imagp[0]
contains HN/2.
For 0 < k < N/2, A.realp[k]
and A.imagp[k]
combined contain Hk. Specifically, A.realp[k]
contains the real part of Hk, and A.imagp[k]
contains the imaginary part of Hk. Equivalently, Hk = A.realp[k]
+ i • A.imagp[k]
.
Some documentation about the vDSP FFTs is here.