Can we replace parameter value with parameter name while generating C code from model?

1 回表示 (過去 30 日間)
Avani Shah
Avani Shah 2023 年 3 月 21 日
回答済み: Andy Bartlett 2023 年 3 月 22 日
Is it possible to bring 'constant name' instead of 'constant value' while generating C code from simulink model?
e.g. Suppose A = 429 and B = 459
so generated code should be like
if (rtb_Switch <= A ) {
EV_B.Saturation_g = rtb_Switch;
}
else {
EV_B.Saturation_g = B;
}
Constant value should be defined either in same code file or different parameter file.

回答 (1 件)

Andy Bartlett
Andy Bartlett 2023 年 3 月 22 日

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by