How can I force variables that are optimized away to appear in the generated code using Coder products?
Show older comments
I have a model in Simulink for which I would like to generate code. In the generated code, I find that some of the variables are optimized away by the coder. These variables are outputs of a lower-level subsystem and are not used by the higher-level subsystem, but they contain information that is crucial for debugging.
How can I force these variables to appear in the generated code?
Accepted Answer
More Answers (0)
Categories
Find more on Configure Simulation Conditions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!