Engee documentation

Random Number

Generator of normally distributed random numbers.

blockType: RandomNumber

Path in the library:

/Basic/Sources/Random Number

Description

The Random Number block generates normally distributed random numbers. To generate uniformly distributed random numbers, use block Uniform Random Number. 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 starting 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 parameter Seed as a 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

# OUT_1 — output signal
scalar | vector | matrix

Details

The output signal, which is the generated random numbers that fall into a normal distribution. The output sequence is uniquely determined by the initial number.

Data types

Float64.

Complex numbers support

No

Parameters

Main

# Mean — mean value of random numbers
Scalar / array of real numbers

Details

Sets the average value of the generated random numbers.

Default value

0.0

Program usage name

Mean

Tunable

Yes

Evaluatable

Yes

# Variance — random number variance
Scalar / array of real numbers

Details

Sets the variance of the generated random numbers.

Default value

1.0

Program usage name

Variance

Tunable

Yes

Evaluatable

Yes

# Seed — initial number
Scalar / array of Int64

Details

The starting number for the random number generator.

The output sequence is uniquely determined by the starting number.

Default value

0

Program usage name

Seed

Tunable

No

Evaluatable

Yes

# Sample time — interval between calculation steps
SampleTime (real number / vector of two real numbers)

Details

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

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

Default value

0.1

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes

Additional options

C code generation: Yes