How do I get the default case(switch case) in auto code for if-else logic in Simulink model implementation?

7 次查看(过去 30 天)
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).

采纳的回答

TAB
TAB 2018-7-26
You should check below options in Model Configuration Parameters > Code Generation > Code Style

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品


版本

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by