Switch between two inputs
The Manual Switch block is a toggle switch that selects one of its two inputs to pass through to the output. To toggle between inputs, double-click the block. The block propagates the selected input to the output, while the block discards the unselected input. You can interactively control the signal flow by setting the switch before you start the simulation or by changing the switch while the simulation is executing. The Manual Switch block retains its current state when you save the model.
The Manual Switch block accepts real or complex signals of any data type that Simulink® supports, including fixed-point and enumerated data types. For more information, see Data Types Supported by Simulink in the Simulink documentation.
Double-clicking the Manual Switch block toggles the input. To open the block dialog box, right-click the block and select Block Parameters.
Select this check box to allow input signals with different sizes.
Block allows input signals with different sizes, and propagates the input signal size to the output signal.
Block expands scalar inputs to have the same dimensions as nonscalar inputs. For more information, see Scalar Expansion of Inputs and Parameters.
This parameter is not visible in the block dialog box unless
it is explicitly set to a value other than
The following models show how to use the Manual Switch block:
Double | Single | Boolean | Base Integer | Fixed-Point | Enumerated | Bus
Inherited from driving block