igamma
Upper incomplete gamma function.
Category: Mathematics > Mathematical Functions
Syntax
Y = igamma(a, x)
Evaluates the integral from x to infinity of t^(a-1)*exp(-t).
Description
This is the unregularized form: igamma(a, 0) is gamma(a). The regularized upper function is gammainc(x, a, 'upper'), which equals igamma(a, x)/gamma(a). For integer a, igamma(a, x) is (a-1)!*exp(-x)*(1 + x + ... + x^(a-1)/(a-1)!), so igamma(2, 1) is 2/e.
Input arguments
a- Shape parameter.
x- Lower limit of the integral,
x >= 0for real results.
Output arguments
Y- Array formed by broadcasting
aandx.
Example
Integer shape and the regularized form
igamma(2, 1)
2*exp(-1)
igamma(0.5, [1 2])
gammainc([1 2], 0.5, 'upper')*gamma(0.5)
Output
ans = 0.7358
ans = 0.7358
ans = 1×2
0.2788 0.0806
ans = 1×2
0.2788 0.0806
Notes
Complex-valued results (negative arguments) return NaN in MatLivre.