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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 error function problems
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thejester

UK
Posts

Posted - 02/27/2008 :  07:20:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Leo_Li

China
Posts

Posted - 03/04/2008 :  12:11:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

Leo

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000