trnd - Student's t random numbers
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. V can be a vector, a matrix, or a multidimensional
array. 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 v is a row vector. If v is
a 1-by-2 vector, R is a matrix with v(1) rows
and v(2) columns. If v is 1-by-n, R is
an n-dimensional array.
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
random, tpdf, tcdf, tinv, tstat
Student's t Distribution
 | trimmean | | tstat |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit