Simulink Coder eliminates unused function calls/variables in the generated code from StateFlow

2 次查看(过去 30 天)
Hello everyone, I am trying to generate code from a simple StatFlow chart. In my states I make calls to some Matlab Functions defined inside the StatFlow using Matlab Function boxes. The problem is that coder removes function calls whose outputs are not used in transitions. I have to make dummy variables as function returns, and (fake) use them as transition conditions so that the function call is not eliminated in the generated code. Is there any solution or setting that stops the coder from doing this or maybe as it might believe "Optimizing the code"?
Thanks Ramtin

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by