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
 All Forums
 Origin Forum
 Origin Forum
 complex number

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
nbulcourt Posted - 08/06/2002 : 08:13:47 AM
How can I deal with the complex numbers with origin?
Because when I write sqrt(-1) in the script window, origin answers
sqrt(-1)= --.

Thanks a lot for your help.
3   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 02/24/2003 : 10:04:39 AM
quote:

How to use complex numbers in the nlsf e.g.

a=exp(-i*b*x);
y=abs(a+b);

?



Hi,

If you have Origin 7, you can define your fitting functions under NLSF using Origin C, and use complex math. Note that the parameters and datasets used in the function all have to be real. You can however define and use temporary complex variables within your code and perform complex math with them.

Easwar
OriginLab.

phm9gfb Posted - 02/24/2003 : 05:43:36 AM
How to use complex numbers in the nlsf e.g.

a=exp(-i*b*x);
y=abs(a+b);

?
cpyang Posted - 08/06/2002 : 08:53:04 AM
Only Origin C supports complex numbers, like in the following



void test_complex()
{
complex a = 1+2i;
complex b = 2+3i;

complex c = a*b;

out_complex("c=", c);

vector<complex> aa(2), bb(2), cc(2);

aa = a;
bb = b;

cc = aa*bb;

complex d;
d = aa[1] * bb[1];
out_complex("d=", d);
return;
}




The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000