Figured out that the Input Data Type and the One Comparing in Flow chart should be of same data type. I was comparing input of type Int to an Enum, Hence it was generating if else, Changed input to Enum and it generated switch case.
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?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Harish Shekarappa
le 24 Août 2016
Réponse apportée : Harish Shekarappa
le 26 Août 2016
Hi,
I am trying to generated code for a stateflow Flowchart, 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?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Model Configuration Set Customization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!