betarnd
Generate random data from a beta distribution.
Syntax
r=betarnd(a,b)
r=betarnd(a,b,r,c)
Inputs
- a,b
- Shape parameters.
- r,c
- Number of matrix rows and columns.
Outputs
- rnd
- Random data.
Examples
a = 5;
b = 3;
rnd = betarnd(a,b)
rnd = 0.53797
a = 5;
b = 3;
r = 1;
c = 5;
rnd = betarnd(a,b,r,c)
rnd = [Matrix] 1 x 5
0.53797 0.92323 0.71495 0.78982 0.74274
Comments
The random number generator can be initialized using rand.