Is it possible to access the value of a MATLAB workspace parameter from within a TLC file?

2 ビュー (過去 30 日間)
I am using custom source code and header files in Simulink and I would like to be able to generate a parameter value which is defined in the MATLAB workspace in the generated source code. The parameter is not used in any Simulink block directly which is why inlining parameters would not be useful.

採用された回答

MathWorks Support Team
MathWorks Support Team 2011 年 4 月 20 日
To get the value of a MATLAB workspace parameter into the generated code of a Simulink model via a TLC directive you can use the following syntax:
%assign b = FEVAL("evalin","base","a")
%<b>
For an example S-Function and TLC file please see attached application.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by