Engee documentation

EngeeComms.RandomIntegerGenerator

Generates integers randomly distributed in the specified range.

Library

EngeeComms

Block

Random Integer Generator

Description

System object EngeeComms.RandomIntegerGenerator generates uniformly distributed random integers in the range , where set by the SetSize.

To generate random binary or integer data, follow these steps:

  1. Create an object EngeeComms.RandomIntegerGenerator and set its properties.

  2. Call an object with arguments as if it were a function.

To learn more about how to work with system objects, see Engee System Objects.

Syntax

Creation

  • randgen = EngeeComms.RandomIntegerGenerator() — creates a system object to generate integers randomly distributed in the specified range, randgen with properties by default.

    Example:

    randgen = EngeeComms.RandomIntegerGenerator()
  • randgen = EngeeComms.RandomIntegerGenerator(Name=Value) — creates a system object randgen with the specified properties as a pair Name=Value, where Name — the name of the property, and Value — appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their by default values.

    Example:

    randgen = EngeeComms.RandomIntegerGenerator(SetSize=2, OutputDataType=Bool)

Arguments

Output arguments

Out — random integer output

+ scalar | vector | the matrix

Details

Random integer output returned as a scalar, vector, or matrix. The data type is set using the OutputDataType.

The number of lines in the output is equal to the value of the property SamplesPerFrame and corresponds to the number of samples in one frame. The number of columns in the output is equal to the number of elements in the property [Property:setSize] and corresponds to the number of channels.

Типы данных

Int, Bool

Properties

# InitialSeed — initial number
Real number

Details

Initial value for the random number generator as a non-negative integer. If the InitialSeed property is a constant, the resulting sequence is repeatable.

# SetSize — size
Real number

Details

Set size, , specified as a positive integer or a vector string of positive integers. The system object generates integers in the range . The number of elements in SetSize corresponds to the number of independent channels output from the system object.

  • If SetSize is a scalar, then all output random variables are independent and identically distributed.

  • If SetSize is a vector, then the length of the vector determines the number of output channels. Channels can have different output ranges.

# SamplesPerFrame — counts per output frame
Real number

Details

Counts per frame as a positive integer indicating the number of samples per frame in one output data channel.

Data types

Int64

# OutputDataType — output data type
String

Details
Data types

String

# SampleTime — sampling period
Real number

Details

The sampling period specified as a positive number. To inherit the sampling period, set this property to -1.

Methods

Common to all system objects

step!

Run the algorithm of the system object