Generates random data from the F probability distribution. There are two forms. |
||
Syntax |
RND = F_Rnd(m, n, Rows, Cols, Seed, State) RND = F_Rnd(m, n, Seed, State) |
|
Arguments |
Name |
Description |
m |
First degrees of freedom parameter. A scalar, vector or matrix of positive integers. |
|
n |
Second degrees of freedom parameter. A scalar, vector or matrix of positive integers. |
|
Rows (optional) |
Number of output rows. A positive integer. Only valid when m and n are scalars. |
|
Cols (optional) |
Number of output columns. A positive integer. Only valid when m and n are scalars. |
|
Seed (optional) |
The seed to initialize the random number generator. An integer. See Comments below. |
|
State (optional) |
Set to "discard" if the state of the pseudo random number is not to be retained for future use. The default is "retain". |
|
Outputs |
Name |
Description |
RND |
Random numbers from the F distribution. Its dimensions are determined by the input arguments. See Comments below. |
|
Example 1 |
Generate two random numbers from the F distribution with (m, n) pairs of (2, 5) and (4, 3), respectively, with a random seed of 2003 |
|
Syntax |
||
rnd = F_Rnd([2,4],[5,3],2003) |
||
Results |
||
rnd = 1.7894 0.5193 |
||
Example 2 |
Generate a 1x4 vector of random numbers from the F distribution with m = 2 and n = 5 and a random seed of 2003. |
|
Syntax |
||
rnd = F_Rnd(2,5,1,4,2003) |
||
Results |
||
rnd = 1.7894 0.60133 0.099753 12.343 |
||
Comments |
m and n must be the same size. If the optional size inputs are omitted, the size of the output is solely determined by the size of the two inputs m and n. Each entry in the output uses the corresponding entries in the two inputs. If the optional size inputs are provided, both must be supplied. In that case, m and n must be scalars and the size of the output is determined by Rows and Cols. That is, the inputs m and n are used for each element of the output. The Seed can be any number. Using a seed allows a random sequence to be repeated. |
|
See Also: |