Fixed-Point Blockset | ![]() ![]() |
Choose between multiple block inputs
Library
Simulink Signal Routing and Fixed-Point Blockset Select
Description
The Multi-Port Switch block chooses between a number of inputs. The first (top) input is called the control input, while the rest of the inputs are called data inputs. The value of the control input determines which data input is passed through to the output port.
If the control input is an integer value, then the specified data input is passed through to the output. For example, suppose the Use zero-based indexing parameter is not selected. If the control input is 1
, then the first data input is passed through to the output. If the control input is 2
, then the second data input is passed through to the output, and so on. If the control input is not an integer value, the block first truncates the value to an integer by rounding to floor. If the truncated control input is less than 1
or greater than the number of input ports, an out-of-bounds error is returned.
You specify the number of data inputs with the Number of input ports parameter. The data inputs can be scalar or vector. The block output is determined by these rules:
When the Show additional parameters check box is selected, some of the parameters that become visible are common to many blocks. For a detailed description of these parameters, refer to Block Parameters.
The Index Vector block, also in the Fixed-Point Blockset Select library, is another implementation of the Multi-Port Switch block that has different default parameter settings.
Data type support
The control input of a Multi-Port Switch block can be a real-valued signal of any data type, including fixed-point data types. The data inputs can of any complexity and data type, including fixed-point data types.
Parameters and Dialog Box
Characteristics
Dimensionalized |
Yes |
Direct Feedthrough |
Yes |
Sample Time |
Inherited from driving blocks |
Scalar Expansion |
Yes |
Zero Crossing |
No |
![]() | Multiply Matrix | Product | ![]() |