gamrnd
Gamma random numbers
Description
Examples
Input Arguments
Output Arguments
Alternative Functionality
gamrnd
is a function specific to the gamma distribution. Statistics and Machine Learning Toolbox™ also offers the generic functionrandom
, which supports various probability distributions. To userandom
, create aGammaDistribution
probability distribution object and pass the object as an input argument or specify the probability distribution name and its parameters. Note that the distribution-specific functiongamrnd
is faster than the generic functionrandom
.Use
randg
to generate random numbers from the standard gamma distribution (unit scale).To generate random numbers interactively, use
randtool
, a user interface for random number generation.
References
[1] Marsaglia, George, and Wai Wan Tsang. “A Simple Method for Generating Gamma Variables.” ACM Transactions on Mathematical Software 26, no. 3 (September 1, 2000): 363–72. https://doi.org/10.1145/358407.358414.
Extended Capabilities
Version History
Introduced before R2006a