Communications Blockset    
Random Integer Generator

Generate integers randomly distributed in the range [0, M-1]

Library

Data Sources sublibrary of Comm Sources

Description

The Random Integer Generator block generates uniformly distributed random integers in the range [0, M-1], where M is the M-ary number defined in the dialog box.

The M-ary number can be either a scalar or a vector. If it is a scalar, then all output random variables are independent and identically distributed (i.i.d.). If the M-ary number is a vector, then its length must equal the length of the Initial seed; in this case each output has its own output range.

If the Initial seed parameter is a constant, then the resulting noise is repeatable.

Attributes of Output Signal

The output signal can be a frame-based matrix, a sample-based row or column vector, or a sample-based one-dimensional array. These attributes are controlled by the Frame-based outputs, Samples per frame, and Interpret vector parameters as 1-D parameters. See Signal Attribute Parameters for Random Sources in Using the Communications Blockset for more details.

The number of elements in the Initial seed parameter becomes the number of columns in a frame-based output or the number of elements in a sample-based vector output. Also, the shape (row or column) of the Initial seed parameter becomes the shape of a sample-based two-dimensional output signal.

Dialog Box

M-ary number
The positive integer, or vector of positive integers, that indicates the range of output values.
Initial seed
The initial seed value for the random number generator. The vector length of the seed determines the length of the output vector.
Sample time
The period of each sample-based vector or each row of a frame-based matrix.
Frame-based outputs
Determines whether the output is frame-based or sample-based. This box is active only if Interpret vector parameters as 1-D is unchecked.
Samples per frame
The number of samples in each column of a frame-based output signal. This field is active only if Frame-based outputs is checked.
Interpret vector parameters as 1-D
If this box is checked, then the output is a one-dimensional signal. Otherwise, the output is a two-dimensional signal. This box is active only if Frame-based outputs is unchecked.

See Also

randint (Communications Toolbox)


  Random Deinterleaver Random Interleaver