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
 Non-Linear Curve Fitting - Part II
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Hume316

3 Posts

Posted - 12/12/2008 :  06:26:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and SR (Select Help-->About Origin):
Operating System: Pro 7.5 (SR6) and 8.0 (SR2)

Hi folks-

I am trying to fit some data using the Advanced Non-Linear Curve Fitting tool. My data are similar to an exponential growth curve - initially linear then a sharp curve and finally an asymptote. The equation I use is most similar to the exponential function found in Origin's list of functions called BoxLucas1, which is:

y = a*(1-exp(-b*x))

My equation, The Platt Equation for Primary Production, is:

y = a*(1-exp((-b*x)/a))

Based on the sample curve Origin gives for BoxLucas1, I believe that the coefficients represent:

a = the asymptote of the fit
b = the slope of the initial linear fit.


And both these coefficients also satisfy my equation - the reason I choose it. Assuming this is true, I copied the BoxLucas1 model word for word into a user-defined function, only changing the equation to the above. I have tested the equation in the Origin's Code Builder, and it compiles fine, so I don't think my equation is off.

However, when I go to run the model on my data, the fit looks nothing like I expected. Specifically, there fit does not asymptote and the initial linear growth is not very linear (more of a gradual arc).

I realize there could be any number of problems here, and posting this topic is really just a shot in the dark. My guy feeling is that I am using the wrong base equation (the BoxLucas1) and that I am incorrectly defining the coefficients a and b. I don't think I am up for writing that bit of code though...Any suggestions?

easwar

USA
1965 Posts

Posted - 12/12/2008 :  2:09:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I took some test data and fitted first with Boxlucas1 built-in function. I then defined a new function using your modified equation, and I fitted same data and obtained a good fit curve - the parameter a turned out to be same value in both fit results, but b was different (not sure if a being same makes sense...)

Did your newly defined function compile correctly? Did you try putting in different initial values for your user defined function's parameters to start off the fit at a different point? Depending on data (and how good or bad the model matches the data) a different set of initial values "could" result in a different set of parameter values, particularly if function has over-parameterization (which does not appear to be the case here though)

You could send your FDF and your data to tech support for them to check.

Easwar
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