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
 Please help me with Digamma function 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

perwrinkle

China
2 Posts

Posted - 10/10/2016 :  07:03:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver9.3.226. and Service Release (Select Help-->About Origin):
Operating System:win10

I went through all the Tutorials and Origin forum, tried to find a easy way to do the Digamma function fitting.

So far "Fitting with Two Integrals using LabTalk Function: http://www.originlab.com/doc/Tutorials/Fitting-2Integral-LabTalk " seems to be a reasonable way to do this.

However after I define the function with LabTalk Functions Definition and Initializations box:

y=integral(MyDIB1, 0, 1, B1, x)-integral(MyDIB2, 0, 1, B2, x)-ln(B1/B2)


function double MyDIB1(double t, double iB1, double ix)
{
return (1-t^(iB1/ix-0.5))/(1-t) ;

}


function double MyDIB2(double t, double iB2, double ix)
{
return (1-t^(iB2/ix-0.5))/(1-t) ;
}

B1,B2 supposed to be fitted according to my data while they sticked to my initial values with fixed box unchecked and somehow it always came with "Fit did not converge - reason unknown"

I have no idea what's wrong here. Is it my definition of Digamma function ? Or could it be my initial values of B1 & B2 are far from the right values since I inputted them manually?
Could anyone help me to check it out? Thank you so much!

Edited by - perwrinkle on 10/10/2016 07:14:48 AM

Shirley_GZ

China
Posts

Posted - 10/10/2016 :  10:48:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I have tried to define the function using the equations you provided, in my opinion, the fitting function is alright. And I have also simulated curve with this function, the result is good to me, see the screenshot below:



So that means there is no problem with defining the function, but some other problem.

Please do some further checking, especially adjusting the initial values for B1 and B2. If still problem, please send us the FDF file with appropriate initial values and the Origin project file with source data, via tech@originlab.com.

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

perwrinkle

China
2 Posts

Posted - 10/12/2016 :  09:51:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much for your reply.
I made the same simulation before I posted here, that is the first step to check my definition of Digamma function. Then I went through some specific values to output something like digamma (1), it all past. That is why I came on to initial values of B1 and B2, and what you replied confirms my suspicious of that.
Here is my solution: I went to Mathematica, take one set of my data (x0,y0) known, fixed B1=1, solve the equation with B2. Then use the B1, B2 values for initials in Origin, the fitting finally works out!
I wish there would be more easy way to do it, however that is what I got.
If you knows something better, please add it in the manuals for us. Really appreciated!!!
Go to Top of Page

Shirley_GZ

China
Posts

Posted - 10/12/2016 :  11:44:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Yes, you got the key, I think. Furthermore, you can do this automatically in Origin by adding your own parameter initialization code. More details, please refer to this help page,
http://www.originlab.com/doc/Origin-Help/FitPara-INI

Thanks,
Shirley



Originlab Technical Service Team
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