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 |
|
|