フィルターのクリア

Simulink: comment block by set_param in callback

2 ビュー (過去 30 日間)
Alexander
Alexander 2015 年 10 月 14 日
編集済み: Alexander 2015 年 10 月 14 日
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 件)

カテゴリ

Help Center および File ExchangeModel, Block, and Port Callbacks についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by