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!