Categories &

Functions List

Function Reference: chi2rnd

statistics: r = chi2rnd (df)
statistics: r = chi2rnd (df, rows)
statistics: r = chi2rnd (df, rows, cols, …)
statistics: r = chi2rnd (df, [sz])

Random arrays from the chi-squared distribution.

r = chi2rnd (df) returns an array of random numbers chosen from the chi-squared distribution with df degrees of freedom. The size of r is the size of df.

When called with a single size argument, chi2rnd 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.

Further information about the chi-squared distribution can be found at https://en.wikipedia.org/wiki/Chi-squared_distribution

See also: chi2cdf, chi2inv, chi2pdf, chi2stat

Source Code: chi2rnd