Function Reference: gevrnd

statistics: r = gevrnd (k, sigma, mu)
statistics: r = gevrnd (k, sigma, mu, rows)
statistics: r = gevrnd (k, sigma, mu, rows, cols, …)
statistics: r = gevrnd (k, sigma, mu, [sz])

Random arrays from the generalized extreme value (GEV) distribution.

r = gevrnd (k, sigma, mu returns an array of random numbers chosen from the GEV distribution with shape parameter k, scale parameter sigma, and location parameter mu. The size of r is the common size of k, sigma, and mu. A scalar input functions as a constant matrix of the same size as the other inputs.

When called with a single size argument, gevrnd returns a square matrix with the dimension specified. When called with more than one scalar argument, the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The size may also be specified with a row vector of dimensions, sz.

When k < 0, the GEV is the type III extreme value distribution. When k > 0, the GEV distribution is the type II, or Frechet, extreme value distribution. If W has a Weibull distribution as computed by the wblcdf function, then -W has a type III extreme value distribution and 1/W has a type II extreme value distribution. In the limit as k approaches 0, the GEV is the mirror image of the type I extreme value distribution as computed by the evcdf function.

The mean of the GEV distribution is not finite when k >= 1, and the variance is not finite when k >= 1/2. The GEV distribution has positive density only for values of x such that k * (x - mu) / sigma > -1.

Further information about the generalized extreme value distribution can be found at https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

See also: gevcdf, gevinv, gevpdf, gevfit, gevlike, gevstat

Source Code: gevrnd