| Statistics Toolbox | ![]() |
Random numbers from Student's t distribution.
Syntax
R = trnd(V) R = trnd(V,m) R = trnd(V,m,n)
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.
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
| trimmean | tstat | ![]() |