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
 All Forums
 Origin Forum
 Origin Forum
 How I use my own functions for Non-linear fitting?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
vldluca Posted - 10/26/2005 : 08:58:02 AM
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!
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 10/26/2005 : 10:49:24 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000