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.

 채택된 답변

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개)

카테고리

도움말 센터File Exchange에서 Stateflow에 대해 자세히 알아보기

제품

릴리스

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by