Documentation Center

  • Trials
  • Product Updates

trnd

Student's t random numbers

Syntax

R = trnd(V)
R = trnd(V,m,n,...)
R = trnd(V,[m,n,...])

Description

R = trnd(V) generates random numbers from Student's t distribution with V degrees of freedom. V can be a vector, a matrix, or a multidimensional array. The size of R is the size of V.

R = trnd(V,m,n,...) or R = trnd(V,[m,n,...]) generates an m-by-n-by-... array. The V parameter can be a scalar or an array of the same size as R.

Examples

noisy = trnd(ones(1,6))
noisy =
  19.7250  0.3488  0.2843  0.4034  0.4816  -2.4190

numbers = trnd(1:6,[1 6])
numbers =
  -1.9500  -0.9611  -0.9038  0.0754  0.9820  1.0115

numbers = trnd(3,2,6)
numbers =
 -0.3177 -0.0812 -0.6627  0.1905 -1.5585 -0.0433
  0.2536  0.5502  0.8646  0.8060 -0.5216  0.0891

See Also

| | | |

Was this topic helpful?