Simulink Reference | ![]() ![]() |
Generate normally distributed random numbers
Library
Description
The Random Number block generates normally distributed random numbers. The seed is reset to the specified value each time a simulation starts.
By default, the sequence produced has a mean of 0 and a variance of 1, although you can vary these parameters. The sequence of numbers is repeatable and can be produced by any Random Number block with the same seed and parameters. To generate a vector of random numbers with the same mean and variance, specify the Initial seed parameter as a vector.
To generate uniformly distributed random numbers, use the Uniform Random Number block.
Avoid integrating a random signal, because solvers are meant to integrate relatively smooth signals. Instead, use the Band-Limited White Noise block.
All the block's numeric parameters must be of the same dimension after scalar expansion.
Data Type Support
A Random Number block accepts and outputs signals of type double
.
Parameters and Dialog Box
0
.1
.0
.0
, causing the block to have continuous sample time. See Specifying Sample Time in the online documentation for more information.If this option is selected and the other parameters are one-row or one-column matrices, after scalar expansion, the block outputs a 1-D signal (vector). Otherwise, the output dimensionality is the same as that of the other parameters.
Characteristics
Sample Time |
Continuous or discrete |
Scalar Expansion |
Of parameters |
Dimensionalized |
Yes |
Zero Crossing |
No |
![]() | Ramp | Rate Limiter | ![]() |