How can I modify the MATLAB function block within a Library block (with active link) from the command line?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 23 de Jun. de 2016
Respondida: MathWorks Support Team
el 24 de Jun. de 2016
How can I modify the MATLAB function block within a Library block (with active link) from the command line?
Respuesta aceptada
MathWorks Support Team
el 23 de Jun. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!