How to have multiple seeds for random generation in Simulink?

4 次查看(过去 30 天)
I have a model in Simulink that uses the `Random Number` block. This `Random Number` block uses a `Seed` value for the generation of random values. Now if I have multiple copies of my model:
main.slx
|
|-----> child_1.slx (Random Number block inside)
|
|
|-----> child_2.slx (Random Number block inside)
|
|
|-----> child_3.slx (Random Number block inside)
How can I set the `Seed` of `Random Number` to be different in each copy?

采纳的回答

TAB
TAB 2018-8-24
  1. In Child model --> Create Model parameter for seed.
  2. In "Model Block" in Parent model --> Pass the seed value in "Model Argument" field

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by