Generate integers randomly distributed in specified range
Communications Toolbox / Comm Sources / Random Data Sources
The Random Integer Generator block generates uniformly distributed random integers in the range [0, M-1], where M is specified by the Set size parameter. Use this block to generate random binary-valued or integer-valued data.
To ensure that the model uses different initial seeds, set the Simulate using parameter to
Interpreted execution
, and run the simulation in Normal
or Accelerator mode. For more information, see Limitations.
In Rapid Accelerator simulation mode, when you set Simulate using to
Interpreted execution
and Source of initial seed to Auto
, the block generates the
same numbers every time the simulation runs. This behavior is equivalent to
setting Source of initial seed to Parameter
and setting
Initial seed to
0
.
In all simulation modes (Normal, Accelerator, and Rapid Accelerator), when you
set Simulate using to
Code generation
and Source of initial seed to Auto
, the block generates the
same numbers every time the simulation runs. This behavior is equivalent to
setting Source of initial seed to Parameter
and Initial seed to
0
.
For more information, see Choosing a Simulation Mode (Simulink).
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|