When I generated the code for my Simulink model which contain if-else logic(States when execution is resumed: Reset for both if and else actions), the code is generated with switch statement without default case. So when I do static analysis(polyspace code prover) it is giving 16.4 violation(default case is mandatory).
MATLAB: How to get the default case(switch case) in auto code for if-else logic in Simulink model implementation
Embedded Codergeneration of default case for switchMATLABsimulink
Related Question
- Empty default switch-case-structure if temporal logic is inside if-else triggered subsystem
- Hi, In Configuration Parameters, Code style I have selected th option to Convert if-elseif-else to switch case statements but the generated code still generates the code using if else. How to make sure it generates using switch case
- Switch case
- Question regarding a switch statement
- Switch case
Best Answer