Hi Sir. Thank you so very much. I really appreciate your help and guidance.Hi,
There are a ton of documents online that talk about C functions and syntax and all that. For complex math i found this first try:
http://en.cppreference.com/w/c/numeric/complex
I actually never used complex number math in C using the standard include files, i always made my own number crunchers for both real and complex arguments, but this looks interesting so i might try it too maybe tomorrow some time. I'll keep it very very simple and post results here also.
Console applications are very easy to make in C. For Windows applications you have to study the Windows API which would take too long for you to get ready by next month.
Here is a sample program in C. Note function calls may be different for other compilers or include files.
#include <stdlib.h>
#include <math.h>
#include <complex.h>
#include <stdio.h>
#include <dos.h> //for sleep()
void main(void)
{
complex xx,yy;
double y;
xx=Complex(1.0,2.0);
yy=cos(xx);
printf("%f,%f\n",real(xx),imag(xx));
printf("%f,%f\n\n",real(yy),imag(yy));
xx=acos(yy);
printf("%f,%f\n",real(yy),imag(yy));
printf("%f,%f\n\n",real(xx),imag(xx));
xx=Complex(2.0,2.0);
yy=atan(xx);
printf("%f,%f\n",real(xx),imag(xx));
printf("%f,%f\n\n",real(yy),imag(yy));
y=atan2(2.0,2.0);
printf("%1.8f\n",y);
sleep(5);
}
The above prints the following to a console screen:
1.000000,2.000000
2.032723,-3.051898
2.032723,-3.051898
1.000000,2.000000
2.000000,2.000000
1.311223,0.238878
0.78539816
I'm going to try all of this and post the results. I was busy with math today (Ztransform and Matrix equations) so tomorrow will definitely do DSP programmes.
Thank you.