Simulink: end simulation message

4 ビュー (過去 30 日間)
Federico Zampolini
Federico Zampolini 2017 年 12 月 9 日
コメント済み: Birdman 2017 年 12 月 9 日
I would like to know if it is possible to make a message appear after the end of a simulation. This message should tell which "stop simulation" block (among the many) made the simulation stop.
Thanks in advance!

採用された回答

Birdman
Birdman 2017 年 12 月 9 日
Of course it is possible. Let me give you a starting point about it. Go to File->Model Properties->Model Properties and go to StopFcn. Write the following line:
warndlg('Simulation ended with success')
Everytime the simulation ends with success, this message will pop up. Assume that simulation time is 10 seconds and you can add an if statement of simulation time like
if Simulation time==10
warndlg('Simulation ended with success')
else
errordlg('Simulation includes an error')
end
This may also work. Hope this helps.
  2 件のコメント
Federico Zampolini
Federico Zampolini 2017 年 12 月 9 日
Thankyou very much!! I did't know about this window, I will use it a lot for sure!
Birdman
Birdman 2017 年 12 月 9 日
My pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by