The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 imaginary part not found
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

nebiha2006

Tunisia
Posts

Posted - 07/19/2006 :  06:42:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

Mike Buess

USA
3037 Posts

Posted - 07/19/2006 :  09:29:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000