The Origin Forum
File Exchange
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
 Curve fitting with log y-axis and x linear axis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

keerthanacivil

6 Posts

Posted - 09/03/2021 :  02:37:20 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

336 Posts

Posted - 09/03/2021 :  03:05:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AmandaLu

336 Posts

Posted - 09/03/2021 :  04:47:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page

keerthanacivil

6 Posts

Posted - 09/03/2021 :  06:01:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

AmandaLu

336 Posts

Posted - 09/03/2021 :  06:07:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please send your data and fitting function to us so we can check:
https://www.originlab.com/restricted/support/NewTicket.aspx

You can find the fitting function file (.fdf file) in User Files Folder/ fitfunc folder.

Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

keerthanacivil

6 Posts

Posted - 09/03/2021 :  07:16:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you share the mail id
Go to Top of Page

keerthanacivil

6 Posts

Posted - 09/03/2021 :  07:32:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To which mail I should send
Go to Top of Page

snowli

USA
891 Posts

Posted - 09/03/2021 :  08:57:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

keerthanacivil

6 Posts

Posted - 09/03/2021 :  09:22:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Sam Fang

270 Posts

Posted - 09/06/2021 :  04:49:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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