Borrar filtros
Borrar filtros

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 visualización (últimos 30 días)
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?

Respuesta aceptada

Harish Shekarappa
Harish Shekarappa el 26 de Ag. de 2016
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.

Más respuestas (0)

Categorías

Más información sobre Model Configuration Set Customization en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by