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
 User Defined Function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

RafaelVS

Brazil
3 Posts

Posted - 03/19/2015 :  3:31:53 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello. I am trying to plot an exponential function like this

where V=y(x) and r=r(x), and a, Z1, Z2, e are constants I need to find.
How can I define a exponential function y = (k/x)exp(-x/a) so that Origin can give me k and a?
I'm using Origin 8.1

Edited by - RafaelVS on 03/19/2015 7:24:03 PM

JacquelineHe

287 Posts

Posted - 03/20/2015 :  04:10:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you want to get the parameters in a user-defined function, you can:
1. In Origin 8.1, you could define a fitting function in Fitting Function Organizer dialog.
Set
http://www.originlab.com/doc/Origin-Help/FitFunc-Organizer-Builder
http://www.originlab.com/doc/Origin-Help/FitFunc-Organizer
Please refer to the Video Tutorial:
http://www.originlab.com/Index.aspx?go=Support/VideoTutorials&pid=1172

2. Highlight your dataset (X and Y), select “Analysis:Fitting:Nonlinear Curve Fit” to open the “NLFit” dialog.
In the “Function Selection” page, choose “Category” and “Function” that you defined. Then do fitting to get the parameter value.
Please refer to the Video Tutorial:
http://www.originlab.com/Index.aspx?go=Support/VideoTutorials&pid=1564


Thanks
Jacqueline
OriginLab
Go to Top of Page

RafaelVS

Brazil
3 Posts

Posted - 04/17/2015 :  2:05:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, I read and did everything in those links but still the best plot I've got was this one:



Is there any way to improve it?

Edited by - RafaelVS on 04/17/2015 2:13:18 PM
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 04/17/2015 :  3:05:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Rafael,

When a part of the curve is very steep (near 0 in your case), the residual's contribution would become
too high and sensitive to the parameters, even though the Chi square may be numerically minimum. To consider
both X and Y directions, you can try to define the fitting function as implicit. Please look at my trial below:
(To make my life easier, I have plugged your parameter values in the definition of this function.)



--Hideo Fujii
OriginLab

P.S. Sorry for that the orthogonal regression for implicit functions has become available in the version 9.0 and later, and only in Pro versions.

Edited by - Hideo Fujii on 04/17/2015 3:19:38 PM
Go to Top of Page

RafaelVS

Brazil
3 Posts

Posted - 04/17/2015 :  3:37:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo Fujii!
That's impressive!! But could you explain it a little more? I didn't quite understand what you did!
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 04/17/2015 :  5:05:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Here is the Origin document about the Nonlinear Implicit Curve Fitting:

http://www.originlab.com/doc/Origin-Help/Fitting-Implicit

which also contains a table of comparison between the Levenberg-Marquardt and the Orthogonal Distance Regression, and the reference of later case. Sorry I haven't originally realized that your version doesn't have this feature. You can download the evaluation version of Origin 2015 to try out this method: http://www.originlab.com/demodownload.aspx

--Hideo Fujii
OriginLab
Go to Top of Page

AndreDourado

Brazil
5 Posts

Posted - 04/24/2015 :  12:41:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I wrote, on Origin 9.0, the function y=A*exp(-B*x)+C*x*exp(-B*x).

It worked twice, but with other data the report error said that it could not converge and that the reason was unknown. Once it said that the parameter were not independent and that I should try to fix one of them, what is not possible to me. What can I do?

Thank you!

André
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