gammainc

Compute incomplete gamma function values.

Syntax

y=gammainc(x,a)

y=gammainc(x,a,tail)

Inputs

x
Values of the distribution random variable.
Type: double
Dimension: scalar | vector | matrix
a
Shape parameter.
Type: double
Dimension: scalar | vector | matrix
tail
The tail option ('lower' or 'upper').
The default is 'lower'.
Type: string

Outputs

y
The area in the tail.

Examples

Scalar example:

x = 4;
a = 10;
y = gammainc(x,a)
y = 0.0081322428
Vector example:
x = [1:1:9];
a = 10;
y = gammainc(x,a,'upper')
y = [Matrix] 1 x 9
1.00000  0.99995  0.99890  0.99187  0.96817  0.91608  0.83050  0.71662  0.58741