Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
thejester
Posted - 02/27/2008 : 07:20:06 AM Origin Version (Select Help-->About Origin): 7.0552 (B552) Operating System: Windows XP
I am attempting to fit using the error function. The general equation that I want to fit to is: y=(1/2)*sqrt(PI)*exp(-(x^2))*erf(x) where x is the dependant variable, I
When I translate this to Origin C I type it as: y=(1/2)*sqrt(PI)*exp(-(x^2))*erf(x)
Is there a problem with the above formulism?
The data I am using has some offsets that I need to consider, The amplitude of the data (designated A) The x offset (designated xc) The y offset (designated c)
To which I modify the above formulism as: y=A*(1/2)*sqrt(PI)*exp(-((x-xc)^2))erf((x-xc))+c
Origin spits out a complaint about it, indicating that the parrameters are the problem specifically, "Error 28037. Likely caused by errors in user defined formula or poor parameter initialization."
x and y are Real as are xc and c, I am pretty sure that A should also be Real. I have added the #include <Stat.h> in the header, is there an extra library needed? Can anyone help?
Edited by - theJester on 02/27/2008 07:26:52 AM
Edited by - thejester on 02/28/2008 11:00:40 AM
1 L A T E S T R E P L I E S (Newest First)
Leo_Li
Posted - 03/04/2008 : 12:11:21 AM
quote: To which I modify the above formulism as: y=A*(1/2)*sqrt(PI)*exp(-((x-xc)^2))erf((x-xc))+c
here it shall be:
y=A*(1/2)*sqrt(PI)*exp(-((x-xc)^2))*erf((x-xc))+c
or it is a typo in the post only?
and you may want to check the parameter initialization section of your formula, as indicated in the error message.
One of the challenging part for user-defined fitting function is its parameter initialization, especially for complex function.