Simulink: comment block by set_param in callback
8 ビュー (過去 30 日間)
古いコメントを表示
I am trying to use the PostLoad Callback to comment out Simulink blocks depending on parameters. So, in a file I have a parameter
UseBlock = 1;% or 0
The Postload function runs this file and knows the value of this parameter and if UseBlock is zero, the Postload function is supposed to comment out a certain block, if the value is 1 it is supposed to uncomment the block. I am using
set_param('Model/Block','Commented','on') % or 'off'
However, it does not work and interestingly any code occuring after this line (in the Postload Callback) is not executed. But I do not see any errors whatsoever.
Any ideas?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!