How to make a Simulink block that runs the same Simulink several times to record the data?

4 ビュー (過去 30 日間)
Hyungbo Shim
Hyungbo Shim 2021 年 7 月 18 日
回答済み: Salman Ahmed 2021 年 9 月 2 日
I want to repeat the same simulation several times and record them with different random inputs.
Instead of repeating this process from an external .m script, is it possible to put a Simulink block (inside the same Simulink) that control the operation of this process automatically?
For example, it may be good to have a block with a push button, and when I push the button, the same simulink file is simulated, say, three times, and all the outputs are saved in a file.
Any idea or keywords to implement it is appreciated. Thank you.

回答 (1 件)

Salman Ahmed
Salman Ahmed 2021 年 9 月 2 日
Hi Hyungbo Shim,
You can repeat an algorithm using a foreach subsytem. Have a look at the sample Simulink model where the foreach subsystem forms your logic (here it is a gain block of 2) to be repeated for different random inputs:

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by