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
 How I use my own functions for Non-linear fitting?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

vldluca

Russia
Posts

Posted - 10/26/2005 :  08:58:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.0
Operating System: Windows XP
How I use my own fitting functions for Non-linear curve fitting? More precisely, the function which I want to use is f(x,a,b)=(x^(k-1)*exp(-x/a))/((b^a)*Gamma(a)) with a>0 and b>0 parameters.
Thanks!

easwar

USA
1964 Posts

Posted - 10/26/2005 :  10:49:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

1> If you do not have the latest service release for version 7, I suggest you get that first (http://www.originlab.com/index.aspx?s=9&lm=144)

2> Bring up NLSF tool and define your function as follows:
-> check user-defined parameter names check box
-> enter parameter names of a, b, k
-> enter x and y for indep and dep var names
-> Make sure the "Use Origin C" checkbox is checked
-> in the function edit box, enter the expression:
y=(x^(k-1)*exp(-x/a))/((b^a)*nag_gamma(a)) ;
-> The above uses the NAG library and a header for that needs to be added. So click on the "Edit in Code Builder" button which opens the function in Code Builder Window
-> Scroll to the top where the #include statements are, and add the following:
#include <OC_NAG.h>
-> Compile the function and click the "Return to NLSF" button
-> Go to Options->Constraints page of NLSF tool and add your constraints
-> Save the function - and try fittig to your data with initial guess values or your own initial parameter estimation codes

Easwar
OriginLab



Edited by - easwar on 10/26/2005 10:53:19 AM
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