Is there a way to create Embedded MATLAB (EML) function blocks using the API in Stateflow?
6 views (last 30 days)
Show older comments
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.
Accepted Answer
MathWorks Support Team
on 15 Sep 2009
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;
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!