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

6 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 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.

Più risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by