i am trying program based on digital signal processing...i wanna create a function which uses complex type to calculate the vale for cos 2*PI*n/8-j sin 2*PI*n/8..where n=0to2 and i wanna use this function to multiply with scalar....i tried by googling it..but i am totally confused....am getting error such that no match call...
i used both <cmath> and <complex>...problem is that operation must define under a function and the function must be multiplied to a real no...i cant do this...anyone pls help me..
The complex numbers in C++ have no problem being multiplied by a scalar, as long as the scalar has the same type: complex<double> can be multiplied by a double, but not by an int or even float.
there is an output error...in this function cos(2*pi*n/8) when n=2 i must get result as zero...but am getting -1.79821e-006....how to clear this problem...