Thread Subject: gammainc - check in excel?

Subject: gammainc - check in excel?

From: Erik Gadzinski

Date: 8 Nov, 2009 17:54:01

Message: 1 of 2

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')

Subject: gammainc - check in excel?

From: Steven Lord

Date: 8 Nov, 2009 22:53:17

Message: 2 of 2


"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

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com