Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: gammainc - check in excel?
Date: Sun, 8 Nov 2009 17:53:17 -0500
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <hd7i32$ejg$1@fred.mathworks.com>
References: <hd70jp$1g2$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1257720738 14960 172.31.44.65 (8 Nov 2009 22:52:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 8 Nov 2009 22:52:18 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:583417



"Erik Gadzinski" <ergadz@yahoo.com> wrote in message 
news:hd70jp$1g2$1@fred.mathworks.com...
> This is not a Matlab question exactly, but does anybody know how I would 
> check the code below in excel?  I don't think excel can do an incomplete 
> gamma. I was given this piece of code from somebody and I want to check it 
> outside matlab because it is giving me values I didn't expect.
>
> Thanks
>
> gammainc((M+1)^N*(-log(q)),1/N,'upper')

For which values of M, N, and q do you receive values you didn't expect?

Anyway, to check this you can use the integral form of GAMMAINC with the 
QUADGK integration function.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/gamma.html

Or you could check if the values of the input arguments for which you're 
evaluating the incomplete gamma function are present in the table of values 
for the function in Abramowitz & Stegun (see the second Reference on the 
page I linked above.)

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ