Using Simulink     Search    Help Desk 
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 (see Uniform Random Number).

Avoid integrating a random signal because solvers are meant to integrate relatively smooth signals. Instead, use the Band-Limited White Noise block.

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 default is 0.
Sample time
The time interval between samples. The default is 0, causing the block to have continuous sample time.

Characteristics

Sample Time
Continuous or discrete
Scalar Expansion
Of parameters
Vectorized
Yes
Zero Crossing
No



[ Previous | Help Desk | Next ]