Can I create tunable parameters in C++ code generated by the Embedded Coder when "Default Parameter Behavior" is "Inlined" in MATLAB R2021b?
古いコメントを表示
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?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!