How can I comment out Simulink subsystem from Matlab script?

90 次查看(过去 30 天)
Hi,
I just found out that there is a great option in Simulink which allows to comment out blocks and subsystems and exclude them form simulaton (right-click on block -> Comment out). I'd like to know, how can I do that using Matlab sctipt (or is it even possible?).
Thanks, Krzysztof

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-9-20
Suppose your model name is untitled , and you want to comment out the block named Unit Delay
set_param('untitled/Unit Delay','commented','on')
% to uncomment
set_param('untitled/Unit Delay','commented','off')
  7 个评论
RAGHUVEER RAJESH
RAGHUVEER RAJESH 2023-9-21
Yes. true, its not working for a subsystem. The command is only applicable for simulink blocks. Has anyone else explore some other solution.

请先登录,再进行评论。

更多回答(1 个)

Hajir Pourbabak
Hajir Pourbabak 2016-3-23
Thanks A lot!

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by