Please, I am beginner and I need to work with complex matrices in C, but do not know how to work with that type. I have an idea of how working with complex numbers, it would just declare a variable and complex and the real parts and print them:
My doubt is how to dynamically allocate a complex array , fill it out and access the elements? I searched the internet and only found a few things in C + +. ThanksCode:#include <stdio.h> #include <complex.h> int main (){ complex double z = 99.0 + 12.0*I; printf("z = %f + %fI\n", creal(z), cimag(z)); return 0; }



LinkBack URL
About LinkBacks



