Changing parameter values after a code is generated using configuration file

조회 수: 1 (최근 30일)
Sanket Mhadgut
Sanket Mhadgut 2020년 10월 13일
답변: BhaTTa 2024년 9월 2일
After a code is generated from Simulink model the parameter values are getting hardcoded in modelname_Data.c file.
Is there any way to edit the parameter values of the generated code directly without the need of generating code of model again with the help of something like a configuration file?
I want to test a code with various values of a parameter once every iteration and creating code everytime with new parameter value is cumbersome.

답변 (1개)

BhaTTa
BhaTTa 2024년 9월 2일
@Sanket Mhadgut, to enable the flexibility of changing parameter values without regenerating the code, you can use a technique called External Parameter Tuning in Simulink. This approach allows you to modify parameter values at runtime by storing them in a separate data structure.
For more information refer to this documentation.

카테고리

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