Loading...
Searching...
No Matches
volk_32f_x2_interleave_32fc

Overview

Takes input vector iBuffer as the real (inphase) part and input vector qBuffer as the imag (quadrature) part and combines them into a complex output vector.

c[i] = complex(a[i], b[i])

Dispatcher Prototype

void volk_32f_x2_interleave_32fc(lv_32fc_t* complexVector, const float* iBuffer, const
float* qBuffer, unsigned int num_points)

Inputs

- iBuffer: Input vector of samples for the real part.
- qBuffer: Input vector of samples for the imaginary part.
- num_points: The number of values in both input vectors.

Outputs

- complexVector: The output vector of complex numbers.

Example Generate the top half of the unit circle with real points equally spaced.

int N = 10;
unsigned int alignment = volk_get_alignment();
float* imag = (float*)volk_malloc(sizeof(float)*N, alignment);
float* real = (float*)volk_malloc(sizeof(float)*N, alignment);
lv_32fc_t* out = (lv_32fc_t*)volk_malloc(sizeof(lv_32fc_t)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
real[ii] = 2.f * ((float)ii / (float)N) - 1.f;
imag[ii] = std::sqrt(1.f - real[ii] * real[ii]);
}
volk_32f_x2_interleave_32fc(out, imag, real, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("out[%u] = %1.2f + %1.2fj\n", ii, std::real(out[ii]), std::imag(out[ii]));
}
volk_free(imag);
volk_free(real);
volk_free(out);