| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
R = chi2rnd(V)
R = chi2rnd(V,u)
R = chi2rnd(V,m,n)
R = chi2rnd(V) generates random numbers from the chi-square distribution with degrees of freedom parameters specified by V. V can be a vector, a matrix, or a multidimensional array. R is the same size as V.
R = chi2rnd(V,u) generates an array R of size u containing random numbers from the chi-square distribution with degrees of freedom parameters specified by V, where u is a row vector. If u is a 1-by-2 vector, R is a matrix with u(1) rows and u(2) columns. If u is 1-by-n, R is an n-dimensional array.
R = chi2rnd(V,m,n) generates an m-by-n matrix containing random numbers from the chi-square distribution with degrees of freedom parameter V.
Note that the first and third commands are the same, but are different from the second command.
r = chi2rnd(1:6)
r =
0.0037 3.0377 7.8142 0.9021 3.2019 9.0729
r = chi2rnd(6,[1 6])
r =
6.5249 2.6226 12.2497 3.0388 6.3133 5.0388
r = chi2rnd(1:6,1,6)
r =
0.7638 6.0955 0.8273 3.2506 1.5469 10.9197chi2cdf | chi2inv | chi2pdf | chi2stat | random
![]() | chi2pdf | chi2stat | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |