jc_0650: Block input/output data type with switching function
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
MATLAB Versions
All
Rule
Sub ID a
For blocks with switching functions (Switch, Multiport Switch, and Index Vector), the same data type shall be used for data ports and output ports.
Custom Parameter
Not Applicable
Example — Correct
The data type for the data port and output port is the same.
Example — Incorrect
The data port and output port have different data types.
Rationale
Sub ID a:
Prevents implicit data conversion.
Verification
Model Advisor check: Check input and output datatype for Switch blocks (Simulink Check)
Last Changed
R2020a
See Also
JMAAB guideline jc_0650, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Version History
Introduced in R2020a