Manual Switch

Switch between two inputs


Signal Routing


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.

Data Type Support

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.

Parameters and Dialog Box

Double-clicking the Manual Switch block toggles the input. To open the block dialog box, right-click the block and select Block Parameters.

Allow the two inputs to differ in size

Select this check box to allow input signals with different sizes.


Default: Off


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.

Command-Line Information

Parameter: varsize
Type: string
Value: 'on' | 'off'
Default: 'off'

Sample time


The following models show how to use the Manual Switch block:

  • sldemo_auto_climatecontrol

  • sldemo_fuelsys

  • sldemo_doublebounce


Data Types

Double | Single | Boolean | Base Integer | Fixed-Point | Enumerated | Bus

Sample Time

Inherited from driving block

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Code Generation


Introduced before R2006a

Was this topic helpful?