如何在 Simulink 中的虚拟块和非虚拟块之间切换?
How to toggle between a virtual and nonvirtual block in Simulink?
在Simulink library browser
-Subsystem examples
-Virtual and nonvirtual subsystem overview
中解释了虚拟子系统和非虚拟子系统的区别:
我的问题是如何在虚拟块和非虚拟块之间切换。我想这很简单,但我找不到它。还是我理解错了?
要手动完成,
- 右键单击子系统
- Select 块参数(子系统)
- 选中'Treat as Atomic Unit'选择框
要从代码中执行此操作,假设已选择该块,
set_param(gcb,'TreatAsAtomicUnit','on'); % turns it on
set_param(gcb,'TreatAsAtomicUnit','off'); % turns it off
在Simulink library browser
-Subsystem examples
-Virtual and nonvirtual subsystem overview
中解释了虚拟子系统和非虚拟子系统的区别:
我的问题是如何在虚拟块和非虚拟块之间切换。我想这很简单,但我找不到它。还是我理解错了?
要手动完成,
- 右键单击子系统
- Select 块参数(子系统)
- 选中'Treat as Atomic Unit'选择框
要从代码中执行此操作,假设已选择该块,
set_param(gcb,'TreatAsAtomicUnit','on'); % turns it on
set_param(gcb,'TreatAsAtomicUnit','off'); % turns it off