How to run a model in simulink several times like a flowchart

조회 수: 2 (최근 30일)
Milad Bahaedini
Milad Bahaedini 2023년 1월 24일
댓글: Jon 2023년 2월 14일
Hi,
I have a model in simulink which includes some function blocks. Now I want to run this model 10 times and each time compare the output of the model to a value and if needed change an input for the next run. anyone can help?

답변 (1개)

Jon
Jon 2023년 1월 24일
You can use the MATLAB sim command to run Simulink programatically in a loop, please see https://www.mathworks.com/help/simulink/slref/sim.html
  댓글 수: 2
Milad Bahaedini
Milad Bahaedini 2023년 1월 24일
yes this maybe works but I'd like to do it in simulink.
Jon
Jon 2023년 2월 14일
I think for what you describe it would make sense to run Simulink "externally" from a loop in MATLAB but you could try to put your workflow into a for iterator subsystem within Simulink https://www.mathworks.com/help/simulink/slref/foriteratorsubsystem.html

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by