Stop Simulink simulation base don a variable value
24 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
0 个评论
更多回答(2 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!