In Simulink library browser
- Subsystem examples
- Virtual and nonvirtual subsystem overview
, the difference between a virtual subsystem and nonvirtual subsystem is explained:
My question is how you can toggle between a virtual and nonvirtual block. I guess it is simple, but I cannot find it. Or do I understand it wrongly?
To do it manually,
To do it from within code, assuming that the block has been selected,
set_param(gcb,'TreatAsAtomicUnit','on'); % turns it on
set_param(gcb,'TreatAsAtomicUnit','off'); % turns it off