Can I create tunable parameters in C++ code generated by the Embedded Coder when "Default Parameter Behavior" is "Inlined" in MATLAB R2021b?
Show older comments
I am using MATLAB R2021b. I have a Simulink model "myModel.slx" that I am generating a C++ class from using the Embedded Coder.
I store all my "Simulink.Parameter" objects in the model workspace of "myModel". I also have the "Default Parameter Behavior" ("DefaultParameterBehavior") setting set to "Inlined".
Because the default behavior is "Inlined", the values of my model parameters are inlined in the generated C++ class and are not stored in any variables. However, I want to be able to make my model workspace parameters tunable so they are a) stored in a variable and b) can be made into global/static variables that are shared among each instance of the C++ class. How can I accomplish this?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder 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!