Effacer les filtres
Effacer les filtres

How can I modify the MATLAB function block within a Library block (with active link) from the command line? 

2 vues (au cours des 30 derniers jours)
How can I modify the MATLAB function block within a Library block (with active link) from the command line? 

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 23 Juin 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.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Produits


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by