6.4 Manipulating a System's Contents
Subsystem and DeleteSubsystem can be used to select or delete a desired part of the system; Subsystem can also rearrange the order of inputs, outputs, or states. The system can be in either state-space or transfer function form (although manipulating state contents is possible for state-space objects only). The element specifications can be either vectors of integers corresponding to indices or the reserved words All or None.
Selecting a part of the system.
Consider a state-space system.
This picks the subsystem that has only the first and third inputs.
This swaps the second and third inputs.
This selects the subsystem that has all inputs, the first output, and the first and third states of the original system ss.
DeleteSubsystem is complementary to Subsystem and has similar syntax.
Deleting a part of the system.
Here is a transfer function of a system with two inputs and three outputs.
This deletes the first and third outputs, leaving all the inputs intact.
MergeSystems merges several systems into one by appending their inputs and outputs (and, for state-space systems, states). The result is in state-space form if at least one of the systems is in this form.
Merging several systems.
Here are two state-space systems.
This merges them into one. The aggregate has all the inputs, outputs, and states of its components.
Here are two transfer functions for the two-input, one-output and the one-input, two-output systems, respectively.
This merges the two transfer functions into one.