Disable blocks through code

5 ビュー (過去 30 日間)
Antonio Garcia
Antonio Garcia 2022 年 4 月 12 日
回答済み: David John 2022 年 4 月 19 日
Good day people!
I want to disable a block in simulink through code in matlab. This is because even though I null the output of this source, it still affects the voltages and thus affect the system that I am working on. Thank you!

回答 (1 件)

David John
David John 2022 年 4 月 19 日
use set_param to set the "Commented" parameter to "on".
For example, if you have a model called "model" with a block that you want to disable called "block", you can try set_param('model/block','Commented','on');

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by