Fixed-Point Blockset | ![]() ![]() |
Switch output between the first input and the third input based on the value of the second input
Description
The FixPt Switch block is a masked S-function that passes through the first (top) input or the third (bottom) input based on the value of the second (middle) input. The second input is called the control input.
The first input is passed through when the second input is greater than or equal to the value of the Threshold parameter. Otherwise, it passes the third input through. The threshold value is converted to the second input's data type.
For a detailed description of all other block parameters, refer to Block Parameters.
Parameters and Dialog Box
Conversions
The Threshold parameter is converted offline to the second input's data type using round-to-nearest and saturation. Refer to Parameter Conversions for more information about parameter conversions.
Characteristics
Input Ports |
Any data type supported by the blockset |
Output Port |
Same as input port one |
Direct Feedthrough |
Yes |
Sample Time |
Inherited |
Scalar Expansion |
Yes |
States |
0 |
Vectorized |
Yes |
![]() | FixPt Sum | FixPt Tapped Delay | ![]() |