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
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!