How can I modify the MATLAB function block within a Library block (with active link) from the command line?
조회 수: 1 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2016년 6월 23일
답변: MathWorks Support Team
2016년 6월 24일
How can I modify the MATLAB function block within a Library block (with active link) from the command line?
채택된 답변
MathWorks Support Team
2016년 6월 23일
You can obtain a handle to the linked MATLAB function block using the following commands:
root = sfroot;
model = getfullname(bdroot(BlockName));
SFMachine = root.find('-isa','Stateflow.Machine','-and','Name',model);
emlObj = SFMachine.find('-isa','Stateflow.LinkChart','-and','Path',BlockName);
where the variable 'BlockName' holds the name of the MATLAB function block you wish to modify.
Once you obtain the emlObj, you can make the desired changes to the MATLAB function block from the command line.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!