gampdf

Compute gamma distribution probability density function values.

Syntax

d=gampdf(x,a,b)

Inputs

x
Values of the distribution random variable.
Type: double
Dimension: scalar | vector | matrix
a
Shape parameter.
Type: double
Dimension: scalar | vector | matrix
b
Scale parameter.
Type: double
Dimension: scalar | vector | matrix

Outputs

d
Probability density values.

Examples

Single value gampdf example:
x = 4;
a = 10;
b = 0.5;
d = gampdf(x,a,b)
d = 0.24815
Vector gampdf example:
x = [1:1:9];
a = 10;
b = 0.5;
d = gampdf(x,a,b)
d = [Matrix] 1 x 9
0.0003819 0.026462 0.13768 0.24815 0.25022 0.17473 0.094688 0.042622 0.01665