Random Number
A generator of normally distributed random numbers.
blockType: RandomNumber
Path in the library:
|
Description
Block Random Number generates normally distributed random numbers. To generate uniformly distributed random numbers, use the block Uniform Random Number. Both blocks use a normal (Gaussian) random number generator.
The generated sequence can be repeated if you use the block Random Number with the same non-negative seed and parameters. The initial value is reset to the specified value each time the simulation starts. By default, the block creates a sequence with a mean value of '0` and a variance of `1'. To generate a vector of random numbers with the same mean and variance, set the parameter Seed like a vector.
Avoid integrating a random signal because solvers have to integrate relatively smooth signals. Use a block instead Band-Limited White Noise.
The numerical parameters of this block must have the same dimensions (after expanding the scalars).
Ports
Output
#
OUT_1
—
output signal
scalar
| vector
| matrix
Details
The output signal, which is the generated random numbers that fall into a normal distribution. The output sequence is uniquely determined by the initial number.
Data types |
|
Complex numbers support |
No |
Parameters
Main
#
Mean —
mean value of random numbers
Scalar / array of real numbers
Details
Sets the average value of the generated random numbers.
Default value |
|
Program usage name |
|
Tunable |
Yes |
Evaluatable |
Yes |
#
Variance —
random number variance
Scalar / array of real numbers
Details
Sets the variance of the generated random numbers.
Default value |
|
Program usage name |
|
Tunable |
Yes |
Evaluatable |
Yes |
#
Seed —
initial number
Scalar / array of Int64
Details
The starting number for the random number generator.
The output sequence is uniquely determined by the starting number.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Sample time —
interval between calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameters to -1
.
By default the value is 0.1
, which corresponds to the default calculation step of the block Band-Limited White Noise.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |