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
Single value betarnd
example:
a = 5;
b = 3;
rnd = betarnd(a,b)
rnd = 0.53797
Vector betarnd
example:
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.