Manual Variant Source

Switch amongst multiple variant choices at input


Signal Routing


The Manual Variant Source block is a toggle switch that activates one of its variant choices at the input to pass through to the output.

A Manual Variant Source block can have two or more input ports and has one output port. Each input port is associated with a variant control.

To toggle between the variant choices at input, double-click the block. The block propagates the active variant choice at input directly to the output and discards the blocks connected to inactive input ports during simulation.

Data Type Support

The Manual Variant Source 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.

Dialog Box and Parameters

To open the block dialog box, right-click the block and select Mask > Mask Parameters.

By default, the number of input choices is 2. You can change the number of inputs by typing a value in the Number of choices box. The maximum number of input choices can be 25.


Double-clicking the Manual Variant Source block does not open the block dialog box instead it toggles the input choice.

Command-Line Information

Parameter: NumChoices
Type: character vector
Value: 2–25
Default: 2


To view how to use the Manual Variant Source block, click Manual Variant Source and Sink Blocks.


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 in R2016b

Was this topic helpful?