Engee documentation

Random Number

Generator of normally distributed random numbers.

random number

Description

The Random Number block generates normally distributed random numbers. To generate uniformly distributed random numbers, use the Uniform Random Number block. Both blocks use a normal (Gaussian) random number generator.

The generated sequence can be repeated if you use the Random Number block with the same non-negative initial number and parameters. The initial value is reset to the specified value each time the simulation starts. By default, the block generates a sequence with mean 0 and variance 1. To generate a vector of random numbers with the same mean and variance, set the Seed parameter as vector.

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

The numerical parameters of this block must have the same dimensionality (after expanding the scalars).

Ports

Output

Port_1 - output signal
scalar | vector | matrix

An output signal that represents the generated random numbers falling into a normal distribution. The output sequence is uniquely determined by the initial number.

Data types: Float64.

Parameters

Mean - average value of random numbers
0 (by default) | scalar

Sets the average value of generated random numbers.

Usage in program code

Block parameter

Mean

Value

scalar

By default

0

Variance - variance of random numbers
1 (by default) | scalar

Sets the variance of generated random numbers.

Usage in program code

Block parameter

Variance

Variance

scalar

By default

1

Seed - initial number
0 (by default) | `positive number `

Initial number for the random number generator.

The output sequence is uniquely determined by the starting number.

Usage in program code

Block parameter

Seed

Value

scalar

By default

0

Sample time - interval between calculation steps
0.1 (By default)

Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameter to -1.

By default the value is 0.1, which corresponds to the default calculation step of the block Band-Limited White Noise.

Usage in program code

Block parameter

SampleTime

Value

scalar

By default

0.1

Additional options

C code generation: Yes