How can I modify the MATLAB function block within a Library block (with active link) from the command line?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 23 Jun. 2016
Beantwortet: MathWorks Support Team
am 24 Jun. 2016
How can I modify the MATLAB function block within a Library block (with active link) from the command line?
Akzeptierte Antwort
MathWorks Support Team
am 23 Jun. 2016
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!