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
 incgamma()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

pliszka

Poland
Posts

Posted - 01/24/2006 :  06:00:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
incgamma(a,x)have two parameters x and a, I'd like to know what thehy mean? and what values I should put to obtain for example gamma(x) because in origin there isn't gamma function and I can't use lngamma()

Mike Buess

USA
3037 Posts

Posted - 01/24/2006 :  08:29:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you have Origin 7 or 7.5 you can use Origin C's nag_gamma function. LabTalk's gammaln function works in all versions... gamma(x) = exp(gammaln(x)).

...Here are the expressions for gamma and incgamma found in the programming guide.

gamma(x):


incgamma(a,x):


So incgamma(a,x=infinity) = gamma(a)/gamma(a) = 1, but it's not clear to me how to obtain gamma(a) from incgamma(a,x) for an arbitrary value of x. I suggest you use one of the methods discussed at the top of this post.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/24/2006 3:18:57 PM
Go to Top of Page

sp973

Australia
Posts

Posted - 12/12/2006 :  11:11:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear friends, the listed description of incomplete Gamma function is OK.
But the real calculated data is different. Unfortunately the algorithm for this function is incorrect. Don't use the incgamma(a,x) at all.
Use the special algorithm from this link: http://alglib.sources.ru/translator/download.php?location=/specialfunctions/gamma/igamma&target=csharp

Good luck !
Serhiy
Go to Top of Page

larry_lan

China
Posts

Posted - 12/13/2006 :  03:03:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Serhiy:

I just compare the OriginC incgamma(x, a) function with Matlab gammainc(x, a) function, the result is the same.

I think you might get the "incorrect result" by using the LabTalk incgamma(a, x) function. Note that the parameters' order is different between LabTalk and OriginC.

Larry
OriginLab Technical Services
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