find_system('stateflow_chart_handle', 'StateflowType', 'Data')
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jeffrey
el 28 de Nov. de 2012
Comentada: Nithin Kumar H M
el 14 de Sept. de 2022
I'm trying to build up a Simulink model from script commands such as find_system, add_block, delete_block, etc. I'm building this model based on the information held within another model. Therefore, I need a list of data store memory blocks and stateflow data stores througout the model, so that I can then take those lists and build up an interface layer and not miss any. The find_system function works just fine for blocks, but it keeps returning an empty matrix when I try to use it on a known stateflow chart subsystem block handle.
My syntax is as follows: find_system('stateflow_chart_handle', 'StateflowType', 'Data')
Any ideas as to what is wrong, or suggestions as to how I can do this right or better?
Thanks.
0 comentarios
Respuesta aceptada
Kaustubha Govind
el 28 de Nov. de 2012
rt = sfroot;
m = rt.find('-isa', 'Simulink.BlockDiagram', '-and', 'Name', 'myModel');
sfDSMData = m.find('-isa', 'Stateflow.Data', 'Scope', 'Data Store Memory');
4 comentarios
Kaustubha Govind
el 29 de Nov. de 2012
You should be able to do:
sfDSMData(1).Scope = 'Input';
Más respuestas (0)
Ver también
Categorías
Más información sobre Complex Logic en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!