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.

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 During Simulation in the online Simulink® documentation for details.

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 Uniform Random Number 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. See Determining the Output Dimensions of Source Blocks.

Characteristics

Sample Time

Specified in the Sample time parameter

Scalar Expansion

No

Dimensionalized

Yes

Multidimensionalized

Yes

Zero Crossing

No

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS