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
 Sech curve fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jh258

United Kingdom
1 Posts

Posted - 01/27/2016 :  11:35:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi All,

I'm new to Origin and have a problem. I'm trying to curve fit some data but I need to use a sech function which is not built into Origin. How do I program/input this function so that I can use it in a similar manner to the built in ones?

Any help would be greatly appreciated.

Thanks,
Jeff

SeanMao

China
288 Posts

Posted - 01/28/2016 :  02:23:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can define an user fitting function on your own for sech.

Suppose the sech fitting function is as below:

sech(x,A,x_0) = 2*A/(exp(x-x_0)+exp(-x+x_0));

where sech(x) = 2/(exp(x)+exp(-x))

To do so, go to menu Tools: Fitting Function Builder to open dialog.

1. Click Next button.
2. Set Function Name as "sech". Click Next.
3. Input "A, x_0" in Parameters.
4. Click Next button. Input 2*A/(exp(x-x_0)+exp(-x+x_0)); in "y=0" edit box.
5. Click the running man button on the bottom middle to test formula is written correctly.
6. Click Finish button and the fitting function is created.

When you open Nonlinear fit dialog from menu Analysis: Fitting: Nonlinear Curve Fit, make sure in Function Selection page, select Category as "User Defined" and you will be able to select sech(User) from the Function dropdown list.

Regards!

Sean

OriginLab Tech.
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