GetReal
Get the real part of a complex vector.
int GetReal( vector & vReal )
Returns 0 on success or -1 on failure.
EX1
void vectorbase_GetReal_ex1() { vector<complex> vecC = {1+2i, 3+4i, 5+6i, 7+8i}; vector vecR; vecC.GetReal(vecR); for (int ii = 0; ii < vecR.GetSize(); ii++) printf("%g ", vecR[ii]); // Result: // vecR = {1, 3, 5, 7}; }
Get the real part of a complex vector. Causes a runtime error if the underlying base type of the vector is not complex.
vectorbase::GetImaginary, vectorbase::GetPhase, vectorbase::GetAmplitude, vectorbase::Conjugate, vectorbase::MakeComplex
origin.h