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
 Fitting an error function to data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sharapova

France
5 Posts

Posted - 12/11/2014 :  04:55:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi there, I have experimental data that seem to give a sigmoidal like shape. My supervisor told me to fit an error function (but he didn't specifiy further). Wikipedia gives me the following:

http://en.wikipedia.org/wiki/Error_function

So I have 2 problems:

1. I need to introduce fitting parameters to account for x/y shift and the curvature...I am a bit confused about the integral, but I was thinking to adjust the gaussian function inside of it, so I would substitute exp(-x2) by
A + exp(-k(x2-x0))

but maybe this is wrong and there is an easier way to do this ?

Anyways,

2. How can I implement this in Origin ? I would prefer to avoid coding since I only started using this software. I don't quite see how to insert a formula containing an integral, the more so as I am wondering whether Origin is capable of doing such a fit..

I am looking forward to your answers

Cheers

Hideo Fujii

USA
1582 Posts

Posted - 12/11/2014 :  11:51:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi SharapovaA

As Origin has the built-in math function of erf(x), you can define your shifted fitting function as:
  Function Type: LabTalk
  Parameters: x0,y0,A,k
  Function: y=A*erf(k*(x-x0))+y0
This works?

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 12/11/2014 1:26:33 PM
Go to Top of Page

sharapova

France
5 Posts

Posted - 12/12/2014 :  10:52:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo,

I tried to define a new user built function using the user interface (I dont know how to code in Origin) but the fit doesnt converge and Origin tells me that I might have overparametrized...
Maybe one of the parameters is redundant ?
Likewise, the Origin built in error function doesnt seem to be defined for negative x values...do you maybe have any more advice on that ?

cheers and thx in advance !
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 12/12/2014 :  12:45:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi sharapovaA

> Maybe one of the parameters is redundant ?

I don't think so, and maybe your initial parameter values are not reasonably good enough?

> the Origin built in error function doesnt seem to be defined for negative x values

As far as I tested in my Origin 2015, erf(x) takes negative X, of course resulting erf(-x)= -erf(x). Which version of Origin are you using?

--Hideo Fujii
OriginLab

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