This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Student's t random numbers


r = trnd(nu)
r = trnd(nu,m,n,...)
r = trnd(nu,[m,n,...])


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

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


collapse all

r1 = trnd(ones(1,6))
r1 =

    0.2108    7.8450  -11.0511    0.4134    4.3293   -0.8323

r2 = trnd(1:6,[1 6])
r2 =

    8.9290   -0.1908    0.3496   -0.7658    1.3234   -1.2808

r3 = trnd(3,2,6)
r3 =

    1.3157    0.7010    0.1591   -1.3840    4.1354    0.2442
    0.9789   -2.4700   -1.8884   -0.0116   -0.9496   -0.2340

Extended Capabilities

Introduced before R2006a

Was this topic helpful?