Simulink Reference    
Uniform Random Number

Generate uniformly distributed random numbers

Library

Sources

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

A Uniform Random Number block outputs a real signal of type double.

Parameters and Dialog Box

Minimum
The minimum of the interval. The default is -1.
Maximum
The maximum of the interval. The default is 1.
Initial seed
The starting seed for the random number generator. The default is 0.
Sample time
The sample period. The default is 0. See Specifying Sample Time in the online documentation for more information.
Interpret vector parameters as 1-D

If selected, column or row matrix values for the Step block's numeric parameters result in a vector output signal; otherwise, the block outputs a signal of the same dimensionality as the parameters. If this option is not selected, the block always outputs a signal of the same dimensionality as the block's numeric parameters.

Characteristics

Sample Time
Continuous, discrete, or inherited
Scalar Expansion
No
Dimensionalized
Yes
Zero Crossing
No


  Trigonometric Function Unit Delay