Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Incomplete gamma function

`Y = gammainc(X,A)`

Y = gammainc(X,A,tail)

Y = gammainc(X,A,'scaledlower')

Y
= gammainc(X,A,'scaledupper')

`Y = gammainc(X,A)`

returns
the incomplete `gamma`

function of corresponding
elements of `X`

and `A`

. The elements
of `A`

must be nonnegative. Furthermore, `X`

and `A`

must
be real and the same size (or either can be scalar).

`Y = gammainc(X,A,tail)`

specifies the tail
of the incomplete `gamma`

function. The choices
for `tail`

are `'lower'`

(the default)
and `'upper'`

. The upper incomplete `gamma`

function
is defined as:

$$\text{gammainc}\left(\text{x,a,'upper'}\right)=\frac{1}{\Gamma (a)}{\displaystyle \underset{x}{\overset{\infty}{\int}}{t}^{a-1}{e}^{-t}dt}$$

When the upper tail value is close to 0, the `'upper'`

option
provides a way to compute that value more accurately than by subtracting
the lower tail value from 1.

`Y = gammainc(X,A,'scaledlower')`

and ```
Y
= gammainc(X,A,'scaledupper')
```

return the incomplete gamma
function, scaled by

$$\Gamma (a+1)\left(\frac{{e}^{x}}{{x}^{a}}\right).$$

`X`

and `A`

where `gammainc(X,A,'lower')`

or `gammainc(X,A,'upper')`

underflow
to zero.When `X`

is negative, `Y`

can
be inaccurate for `abs(X)>A+1`

. This applies to
all syntaxes.

[1] Cody, J., *An Overview of Software
Development for Special Functions*, Lecture Notes in Mathematics,
506, Numerical Analysis Dundee, G. A. Watson (ed.), Springer Verlag,
Berlin, 1976.

[2] Abramowitz, M. and I.A. Stegun, *Handbook
of Mathematical Functions*, National Bureau of Standards,
Applied Math. Series #55, Dover Publications, 1965, sec. 6.5.

`gamma`

| `gammaincinv`

| `gammaln`

| `psi`

Was this topic helpful?