Author |
Topic |
|
keerthanacivil
6 Posts |
Posted - 09/03/2021 : 02:37:20 AM
|
Hi. I have some data points which are plotted as x axis linear scale and y axis with log scale. On this plot, I need to do curve fitting whose equation is log(y/C)=exp[A*(x-B)], A,B,C are parameters. I created a new function. How to write this in the equation?
Kindly help me out |
|
AmandaLu
439 Posts |
Posted - 09/03/2021 : 03:05:54 AM
|
Hi,
Please refer to this page for how to define a fitting function in Origin: https://www.originlab.com/doc/tutorials/userdef-fitfunc
To define your fitting function as explicit type, you will need to transform it to y = C*10^(exp(A*(x-B)))
Thanks, Amanda OriginLab Technical Service
|
|
|
AmandaLu
439 Posts |
Posted - 09/03/2021 : 04:47:07 AM
|
Hi,
Parameter’s initial value is very important for fitting with user-defined function. Please make sure you enter proper initial values.
Thanks, Amanda OriginLab Technical Service
|
|
|
keerthanacivil
6 Posts |
Posted - 09/03/2021 : 06:01:11 AM
|
I tried using the parameter values obtained from matlab for fitting in origin. Still the fit is poor in origin. y = C*10^(exp(A*(x-B))) In this C is intercept and is same as the unit of Y-value, presented in log scale. |
|
|
AmandaLu
439 Posts |
|
keerthanacivil
6 Posts |
Posted - 09/03/2021 : 07:16:36 AM
|
Can you share the mail id |
|
|
keerthanacivil
6 Posts |
Posted - 09/03/2021 : 07:32:02 AM
|
To which mail I should send |
|
|
snowli
USA
1386 Posts |
Posted - 09/03/2021 : 08:57:11 AM
|
U can upload file when you reply the post. See the buttons above the big edit box when you reply. There is upload file button.
Thanks, Snow |
|
|
keerthanacivil
6 Posts |
Posted - 09/03/2021 : 09:22:38 AM
|
I am attaching the data in an excel file. log(y/C)=exp[A*(x-B)] is the equation to be fitted in origin. I need confidence and prediction bands at 95% with color shading. When I fitted using matlab, I got the parameters as, A=-0.242; B=11.06; C=1E-11, R2 as 0.91, Adj R2 as 0.91. https://my.originlab.com/ftp/forum_and_kbase/Images/Eboorin.xlsx |
|
|
Sam Fang
293 Posts |
Posted - 09/06/2021 : 04:49:36 AM
|
Hi keerthanacivil,
I used your fitted parameters to calculate R2 and Adj R2, and found it is far less than 0.9. This R2 value comes from MATLAB or is calculated by you manually? Did you use a different method to calculate R2?
There are two methods to fit your data in Origin. 1. Transform your y data to log(y). And fit your data with the function (LabTalk script): y=log(C)+exp( A*(x-B) )
2. Fit y data directly, but choose Instrumental weight method, and select y as weight data. Here we use weight to force the curve to pass lower y points, otherwise the fit will ignore these points because lower y points contribute less to the residual sum of squares. And the function can be defined as: y=C*10^( exp(A*(x-B)) )
Sam OriginLab Technical Services |
|
|
|
Topic |
|