02-17-2020 02:25 AM
I need to generate some complex coefficients in an array in Xilinx SDK.
What I am doing is using #include <complex.h> Written by Matthias Drochner.
It works well when I use it for a number not in array.
but I have a function like bellow:
void weight_generator(int N, float complex weights)
float complex cpmxpower;
for (int k =0;k<N/2;k++)
cpmxpower = 0 - 2 *I * M_PI * k / N;
weights[i] = cpmxpower ;
then it gives me error at "weights[i] = cpmxpower ;"
Multiple markers at this line
- 'i' undeclared (first use in this function)
- each undeclared identifier is reported only once for each function it
It doesnt understand "i" as imaginary part when I use it to give value to an element in an array.
Thanks for your help.