'if' instead of a 'switch' when auto code generation

5 vues (au cours des 30 derniers jours)
예진 박
예진 박 le 5 Juil 2024
Réponse apportée : Udit06 le 5 Juil 2024
Is there a way to make the transition in Stateflow in a Simulink model appear as an 'if' instead of a 'switch' when auto code generation?
About the criteria for 'swich' and 'if' .
Also, is there a way to set the 'Switch' or the 'If' through the Embedded Coder configuration?

Réponses (1)

Udit06
Udit06 le 5 Juil 2024
You can refer to the "ConvertIfToSwitch" configuration parameter of "coder.EmbeddedCodeConfig" object to control the generation of the "switch" and "if" statements. Please refer to the following MathWorks documentation for more details.
I hope this helps.

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by