How do I get the default case(switch case) in auto code for if-else logic in Simulink model implementation?
6 次查看(过去 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).
0 个评论
采纳的回答
TAB
2018-7-26
You should check below options in Model Configuration Parameters > Code Generation > Code Style
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!