Simulink Reference    
Random Number

Generate normally distributed random numbers

Library

Sources

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

Mean
The mean of the random numbers. The default is 0.
Variance
The variance of the random numbers. The default is 1.
Initial seed
The starting seed for the random number generator. The seed must be 0 or a positive integer. The default is 0.
Sample time
The time interval between samples. The default is 0, causing the block to have continuous sample time. See Specifying Sample Time in the online documentation for more information.
Interpret vector parameters as 1-D

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