Stop Simulink simulation base don a variable value

31 ビュー (過去 30 日間)
Javier Guiterrez
Javier Guiterrez 2011 年 6 月 20 日
Hello:
I want ot know how to stop a simulink simulation automatically when one of the variables reaches a negative value. I will run it through a .m file
Thank you in advance

採用された回答

Arnaud Miege
Arnaud Miege 2011 年 6 月 20 日
Or use a Stop Simulation block. You will also need to construct the logic to create a boolean input signal to the block.
HTH,
Arnaud

その他の回答 (2 件)

Fangjun Jiang
Fangjun Jiang 2011 年 6 月 20 日
Add an "Assertion" block into your Simulink model. The block is in the library Simulink>Model Verification. It has the option to stop simulation when assertation fails. You need to construct a simple logic to compare your signal to zero.

Javier Guiterrez
Javier Guiterrez 2011 年 6 月 20 日
Thank you for all the answers. the stop block is enough for my case. Thanks

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by