Statistics Toolbox Previous page   Next Page
trnd

Random numbers from Student's t distribution

Syntax

Description

R = trnd(V) generates random numbers from Student's t distribution with V degrees of freedom. The size of R is the size of V.

R = trnd(V,m) generates random numbers from Student's t distribution with V degrees of freedom, where m is a 1-by-2 vector that contains the row and column dimensions of R.

R = trnd(V,m,n) generates random numbers from Student's t distribution with V degrees of freedom, where scalars m and n are the row and column dimensions of R.

Reproducing the Output of trnd

trnd uses the MATLAB functions rand and randn to generate random numbers. When you call trnd, you change the current states of rand and randn, and thereby alter the output of subsequent calls to trnd or any other functions that depend on rand or randn. If you want to reproduce the output of trnd, reset the states of rand and randn to the same fixed values each time you call trnd. For an example of how to do this, and a list of the Statistics Toolbox functions that depend on rand or randn, see Reproducing the Output of Random Number Functions.

Examples

See Also

tcdf, tinv, tpdf, tstat


Previous page  trimmean tstat Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS