1

In Simulink library browser - Subsystem examples - Virtual and nonvirtual subsystem overview, the difference between a virtual subsystem and nonvirtual subsystem is explained:

enter image description here

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?

Karlo
  • 1,630
  • 4
  • 33
  • 57

1 Answers1

1

To do it manually,

  1. Right-click on the subsystem
  2. Select Block Parameters (Subsytem)
  3. Check the 'Treat as Atomic Unit' selection box

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
Phil Goddard
  • 10,571
  • 1
  • 16
  • 28