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 function

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
pegor Posted - 01/23/2008 : 2:02:32 PM
I want to make a fit with a complex function, that is i want to fit the real part of the complex function to my data. Is it possible to do that?
3   L A T E S T    R E P L I E S    (Newest First)
larry_lan Posted - 01/24/2008 : 8:27:29 PM
Hi Pegor:

You don't need to seperate the real and the imaginary parts since the dependent/independent variables are all real. I think you got a complex number during the calculation. So you can define the function body like:

complex cc;
cc = (x-G)/((x-G)^2)-D^2)^0.5;
y = cc.m_re; // variable.m_re returns the real part of a complex number


BTW: What's your Origin version? Such complex calculation requires Origin 7.0 or later.

Thanks
Larry
OriginLab Technical Services

Edited by - larry_lan on 01/24/2008 8:31:29 PM
pegor Posted - 01/24/2008 : 07:54:55 AM
Hi Lary,

My dependent /independent variables are all real. This is the function i have.
y=(x-G)/((x-G)^2)-D^2)^0.5;

G and D are the variables wich i want to fit. I want to fit the real part of this function to my data.

How can i seperate the real and the imaginary parts into two coloumns?

Thank you
Pegor
larry_lan Posted - 01/23/2008 : 9:43:50 PM
Hi Pegor:

The Dependent / Independent variable should be Real. So if your source data is complex, you can seperate the real and imaginary part into two columns, and pass the real value to the fitter.

Otherwise, if you want to include complex calculation in your function, and your input/output is real, you can define an Origin C fitting function like:


complex cc(0.0, b), dd; // cc = bi
dd = a*x+cc; // dd = a*x+bi
y = cc.m_re; // Return the real part of the complex number

(where a, b are fitting parameters)

Thanks
Larry
OriginLab Technical Services

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