Statistics Toolbox    
gamrnd

Random numbers from the gamma distribution

Syntax

Description

R = gamrnd(A,B) generates gamma random numbers with parameters A and B. Vector or matrix inputs for A and B must have the same size, which is also the size of R. A scalar input for A or B is expanded to a constant matrix with the same dimensions as the other input.

R = gamrnd(A,B,m) generates gamma random numbers with parameters A and B, where m is a 1-by-2 vector that contains the row and column dimensions of R.

R = gamrnd(A,B,m,n) generates gamma random numbers with parameters A and B, where scalars m and n are the row and column dimensions of R.

Examples

See Also

gamcdf, gamfit, gaminv, gamlike, gampdf, gamstat


  gampdf gamstat