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

3 ビュー (過去 30 日間)
예진 박
예진 박 2024 年 7 月 5 日
回答済み: Udit06 2024 年 7 月 5 日
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?

回答 (1 件)

Udit06
Udit06 2024 年 7 月 5 日
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.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by