Statistics Toolbox    
chi2rnd

Random numbers from the chi-square (2) distribution

Syntax

Description

R = chi2rnd(V) generates random numbers from the 2 distribution with degrees of freedom parameters specified by V. R is the same size as V.

R = chi2rnd(V,m) generates a matrix of size m containing random numbers from the 2 distribution with degrees of freedom parameter V, where m is a 1-by-2 vector containing the row and column dimensions of R.

R = chi2rnd(V,m,n) generates an m-by-n matrix containing random numbers from the 2 distribution with degrees of freedom parameter V.

Examples

Note that the first and third commands are the same, but are different from the second command.

See Also

chi2cdf, chi2inv, chi2pdf, chi2stat


  chi2pdf chi2stat