T O P I C R E V I E W |
nebiha2006 |
Posted - 07/19/2006 : 06:42:31 AM Origin Version (Select Help-->About Origin): Operating System: Hi, I'm trying to extract the imaginary part of an analytical expression, i don't find the appropriate function in OriginLab 7.5. I've tryied : 'cc.m_im' syntax as showed in a Help exemple, but it doesn't compile. How can I do it?
Thank you.
|
1 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 07/19/2006 : 09:29:42 AM cc.m_im will work fine if cc is a single complex value. For example,
complex cc(3.45, 6.78); out_complex("value = ", cc); out_double("real = ", cc.m_re); out_double("imag = ", cc.m_im);
Output... value = 3.450000+6.780000i real = 3.45 imag = 6.78
If cc is a dataset or vector you can either extract the imaginary value of a specific component...
int i = 0; out_double("imag = ", cc[i].m_im);
or extract all imaginary values to a <double> vector...
vector vi; cc.GetImaginary(vi);
Perhaps you should post the code you are trying to compile.
Mike Buess Origin WebRing Member |
|
|