Is there a way to create Embedded MATLAB (EML) function blocks using the API in Stateflow?

I would like to create EML functions using the Stateflow API; however, the documentation does not mention how I can pass in the code of the EML function.

 Réponse acceptée

This information has been included in the documentation of Stateflow 7.1 (R2008a). For previous product releases, you can use the 'Script' property of the Embedded MATLAB function to achieve this. See a sample code below:
process_function_box = Stateflow.EMFunction(sClusterA);
str=sprintf(' y=process(x)\n y=x;');
process_function_box.script=str;

Plus de réponses (0)

Catégories

En savoir plus sur Stateflow dans Centre d'aide et File Exchange

Produits

Version

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by