| Statistics Toolbox | Search  Help Desk |
| gampdf | Examples |
Gamma probability density function (pdf).
Syntax
Y = gampdf(X,A,B)
Description
gampdf(X,A,B) computes the gamma pdf with parameters A and B at the values in X. The arguments X, A and B must all be the same size except that scalar arguments function as constant matrices of the common size of the other arguments. The parameters A and B must both be positive and X must lie on the interval
).
The gamma pdf is:
2 functions.
Examples
The exponential distribution is a special case of the gamma distribution.mu = 1:5;
y = gampdf(1,1,mu)
y =
0.3679 0.3033 0.2388 0.1947 0.1637
y1 = exppdf(1,mu)
y1 =
0.3679 0.3033 0.2388 0.1947 0.1637