MATLAB Answers

How to have multiple seeds for random generation in Simulink?

6 views (last 30 days)
Luis Ruiz
Luis Ruiz on 24 Aug 2018
Answered: TAB on 24 Aug 2018
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?

  0 Comments

Sign in to comment.

Accepted Answer

TAB
TAB on 24 Aug 2018
  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 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Products


Release

R2018a