Random Number Block

Random Number Block

The Random Number block emits pseudo-random numbers, representing a normal distribution defined by its Mean and Std2 (Standard Deviation, squared).

More details on the definition of normal distributions.

This pseudo-random number generator is often used to model the noise present in a sensor measurement.

The psuedo-random number generator (PRNG) used by this block is the SmallRng from the rand crate. Currently, the PRNG will always be seeded with the number 0. This PRNG does not produce randomness suitable for cryptographic purposes.

Parameters

  • Mean (default = 0.0): The average value around which the distribution is centered.
  • STD2 (default = 1.0): The square of the standard deviation of the distribution.

Examples

Random Number Example