MATLAB: Does the Switch block behave differently in Simulink 6.2 (R14SP2) than in Simulink 6.1 (R14SP1) when handling vector data inputs of different data types

blockcontroldatadifferentinputmismatchportsimulinkswitchtypetypesvector

If I pass 2×1 vector input of different data types, boolean and double for example, into the data input ports of a Switch block, the second control input is ignored in determining the output of the Switch block.

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in Simulink 6.2 (R14SP2) in the way that the Switch block handles switching vector inputs of different data types. To work around this issue, use the Data Type Conversion block to make the inputs to the Switch data ports the same data type.