Name
chis_rnd — chi-squared random draws
CALLING SEQUENCE
[rn]=chis_rnd(nn,v)
PARAMETERS
- Input
nn = a scalar for the size of the vector to be generated or nn(1) = nrows, nn(2) = ncols for a matrix to be generated
v = the degrees of freedom
- Output
rn = (nxm) vector of draws from the chi-squared law
DESCRIPTION
Generates random chi-squared deviates.
EXAMPLE
x=chis_rnd(18,2)
// Creates a (18x1) vector of draws from the chi-square with 2 degrees of freedom distribution.
x=chis_rnd([4 2],3)
// Creates a (4x2) matrix of draws from the chi-square with 3 degrees of freedom distribution.