|
"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
|