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 data with error 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

kidkolja

Germany
2 Posts

Posted - 01/08/2019 :  6:02:18 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello there,
I need to fit an error function to some data but can't quite seem to make it. I defined the function using Labtalk (I'm not very experienced in coding) as
y=A*erf(k*(x-x_0))+y_0
Where I specified A, K, x_0 and y_0 as independent parameters
When i made a test run in the function builder it seemed to yield the expected results. But after saving and trying to use it in the simple fit app, it just always returns a straight line across my data, which obviusly isn't the fit I am expecting.
Does somebody know where I'm messing up?
(I'm using OriginPro 2019)

yuki_wu

896 Posts

Posted - 01/09/2019 :  12:29:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Did you try to set the initial parameter values? I mean initial parameter values play a key role in fitting, you should enter “guesstimate” parameter values before starting fitting.

Regards,
Yuki

OriginLab
Go to Top of Page

kidkolja

Germany
2 Posts

Posted - 01/09/2019 :  03:12:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey Yuki thank you for helping!
Yes I did set some starting values, but as I fit the function they all take much different end values. My supervisor told me, that the starting values are pretty accurate.
I also forgot to mention, that the fitting yields the error code -203 which seems to say that the function is overparametrized but I don't see how...
Go to Top of Page

yuki_wu

896 Posts

Posted - 01/09/2019 :  04:48:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

-203 means fit did not converge since mutual dependency exists between parameters. You can try simplifying the function, or fixing several parameter values:

https://www.originlab.com/doc/Origin-Help/The_Reason_Why_Fail_to_Converge#Over-parameterized_functions

Regards,
Yuki

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