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
 Curve fitting using two user-defined functions

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
ghorycon Posted - 01/08/2012 : 10:04:32 PM
Origin Version : 6.1
Operating System: Win7
I am trying very hard to fit a curve with two user-defined functions. one is a symmetrical Breit-Wigner function.
the other has a asymmetrical lineshape; called the Breit-Wigner-Fano (BWF) function.
I use the following equations for multi-peak fitting:
Fit Parameter(s):
double yl, double A, double w1, double xc1, double xc2, double w2, double Q, double yb,double PI,
Independent Variable(s):double x,
Dependent Variable(s):double& y)

peak1=yl+(2*A/PI)*(w1/(4*(x-xc1)^2+w1^2));
peak2=(yb*(1+2*(x-xc2)/(Q*w2))^2)/(1+(2*(x-xc2)/w2)^2);
y=peak1+peak2;
the compile cannot be done!
Please advice!!! Really need the help!!!
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 01/09/2012 : 1:42:11 PM
Hi,

Origin 6.1 is old, and had no Origin C compiler inside, therefore no compilation process regardless what you wrote. I suggest that the fit function type was set to "Y-Script" (equivalent to "Script" in the later versions), and the initial parameter values before starting the fir process. If you still encounter the problem, and consider that your function definition has a kind of syntactical mistake, you can download the evaluation version of the latest version (Origin 8.6), and try the new fitting tool:
http://www.originlab.com/index.aspx?go=Downloads/OriginEvaluation

This new curve fit tool, NLFit allows you actually to compile the function to see the compilation error (when you set the function type to "OriginC"), if any.

--Hideo Fujii
OriginLab

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