trnd
Generate random data from a Student t distribution.
Syntax
rnd=trnd(n)
rnd=trnd(n,r,c)
Inputs
- n
- Degrees of freedom.
- r,c
- Number of matrix rows and columns.
Outputs
- rnd
- Random data.
Examples
Single value trnd
example:
n = 10;
rnd = trnd(n)
rnd = 1.50967
Vectortrnd
example:
n = 10;
r = 1;
c = 5;
rnd = trnd(n,r,c)
rnd = [Matrix] 1 x 5
1.5097 -1.6855 0.83134 0.13525 1.545
Comments
The random number generator can be initialized using rand.