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!
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