| Simulink Reference | ![]() |
Generate uniformly distributed random numbers
Library
Description
The Uniform Random Number block generates uniformly distributed random numbers over a specifiable interval with a specifiable starting seed. The seed is reset each time a simulation starts. The generated sequence is repeatable and can be produced by any Uniform Random Number block with the same seed and parameters. To generate normally distributed random numbers, use the 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.
The block's numeric parameters must be of the same dimensions after scalar expansion. If the Interpret vector parameters as 1-D option is off, the block outputs a signal of the same dimensions and dimensionality as the parameters. If the Interpret vector parameters as 1-D option is on and the numeric parameters are row or column vectors (i.e., single row or column 2-D arrays), the block outputs a vector (1-D array) signal; otherwise, the block outputs a signal of the same dimensions as the parameters.
Data Type Support
The Uniform Random Number block outputs a real signal of type double.
Parameters and Dialog Box
Opening this dialog box causes a running simulation to pause. See Changing Source Block Parameters in the online Simulink documentation for details.
-1.
1.
0.
0. See Specifying Sample Time in the online documentation for more information.
Characteristics
| Sample Time |
Specified in the Sample time parameter |
| Scalar Expansion |
No |
| Dimensionalized |
Yes |
| Zero Crossing |
No |
| Unary Minus | Unit Delay | ![]() |
© 1994-2005 The MathWorks, Inc.