Generate a matrix of random samples from the Rayleigh distribution.
Arguments
- sigma is the parameter of the Rayleigh distribution. The elements of sigma must be positive.
- sz is the size of the matrix to be generated. sz must be a vector of non-negative integers.
- r is the number of rows of the matrix to be generated. r must be a non-negative integer.
- c is the number of columns of the matrix to be generated. c must be a non-negative integer.
Return values
- x is a matrix of random samples from the Rayleigh distribution with corresponding parameter sigma. If neither sz nor r and c are specified, then x is of the same size as sigma.
Examples
sigma = 1:6; x = raylrnd (sigma) sz = [2, 3]; x = raylrnd (0.5, sz) r = 2; c = 3; x = raylrnd (0.5, r, c)References
- Wendy L. Martinez and Angel R. Martinez. Computational Statistics Handbook with MATLAB. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001.
- Athanasios Papoulis. Probability, Random Variables, and Stochastic Processes. pages 104 and 148, McGraw-Hill, New York, second edition, 1984.