MATLAB Answers

0

How to have multiple seeds for random generation in Simulink?

Luis Ruiz 님이 질문을 제출함. 24 Aug 2018
최근 활동 TAB 님이 답변함. 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

로그인 to comment.

제품


릴리스

R2018a

답변 수: 1

TAB 님의 답변 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

로그인 to comment.



Translated by