Is it possible to access the value of a MATLAB workspace parameter from within a TLC file?
1 view (last 30 days)
Show older comments
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.
Accepted Answer
MathWorks Support Team
on 20 Apr 2011
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 Comments
More Answers (0)
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!