Random Integer Generator
指定した範囲内でランダムに分布された整数を生成する
- ライブラリ:
Communications Toolbox / Comm Sources / Random Data Sources
説明
Random Integer Generator ブロックは、[0, M-1] の範囲に一様分布したランダム整数を生成します。ここで、M は Set size, Set sizeSet sizeSet size パラメーターによって指定されます。このブロックを使用して、ランダムなバイナリ値または整数値のデータを生成します。
モデルで異なる初期シードを使用することを確認するには、Simulate using, Simulate usingSimulate usingSimulate using パラメーターを [インタープリター型実行]
に設定して、ノーマルまたはアクセラレータ モードでシミュレーションを実行します。詳細については、制限を参照してください。
制限
ラピッド アクセラレータ シミュレーション モードで、Simulate using, Simulate usingSimulate usingSimulate using を
[インタープリター型実行]
、Source of initial seed, Source of initial seedSource of initial seedSource of initial seed を[Auto]
に設定すると、ブロックはシミュレーションが実行される各時間に同じ数字を生成します。この動作は、Source of initial seed, Source of initial seedSource of initial seedSource of initial seed を[Parameter]
に設定することと、Initial seed, Initial seedInitial seedInitial seed を0
に設定することと同じです。すべてのシミュレーション モード (ノーマル、アクセラレータ、およびラピッド アクセラレータ) で、Simulate using, Simulate usingSimulate usingSimulate using を
[コード生成]
、Source of initial seed, Source of initial seedSource of initial seedSource of initial seed を[Auto]
に設定する場合、ブロックはシミュレーションが実行される各時間に同じ数値を生成します。この動作は、Source of initial seed, Source of initial seedSource of initial seedSource of initial seed を[Parameter]
に設定することと、Initial seed, Initial seedInitial seedInitial seed を0
に設定することと同じです。
詳細については、シミュレーション モードの選択 (Simulink)を参照してください。
端子
出力
パラメーター
ブロックの特性
データ型 |
|
多次元信号 |
|
可変サイズの信号 |
|