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
 Constraint for fitting function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

waynie

USA
9 Posts

Posted - 03/12/2014 :  3:55:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I typed in the following constraint: 1-exp(-(a^0.5)^b=0 as i wanted the fitted curve to go through the point (0.5,0), however i get an error message saying it does not recognize the parameter 'exp'


My original equation is:y=1-exp(-(a*x)^b)

How can I fix this error?

Waynie Schuette

Kathy_Wang

China
159 Posts

Posted - 03/13/2014 :  03:11:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Firstly could you please verify what your fitting function looks like? It seems to be y=1-exp(-(a*x)^b) but you define the constraint in a different equation that instead of a*x you used a^x.

In addition, it is actually not possible for a function in form y = 1-exp(-(a*x)^b) nor y = 1-exp(-(a^x)^b) to go through point (0.5, 0), unless a equals 0 but then the value of independent variable x do not affect the dependent variable y any more.

Also, in Origin the constraint need to be defined in a linear mode, i.e. the parameters in the defined constraint should be in linear relationship such as 0.5*a + b = 0 but the constraint you defined is a nonlinear one. In that case, you may need to use a different method to make sure the fitted curve go though certain point, two available options are:

a. add an offset to the fitting function, for example change it to y = exp(-(0.5*a)^b) - exp(-(a*x)^b) and fit it directly without defining a constraint and it definitely goes through (0.5, 0)

b. use weighting, you may refer to this tutorial for details.

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