필터 지우기
필터 지우기

find_syste​m('statefl​ow_chart_h​andle', 'StateflowType', 'Data')

조회 수: 11 (최근 30일)
Jeffrey
Jeffrey 2012년 11월 28일
댓글: Nithin Kumar H M 2022년 9월 14일
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.

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 11월 28일
You need to use the Stateflow API to search inside a Stateflow chart. Something like:
rt = sfroot;
m = rt.find('-isa', 'Simulink.BlockDiagram', '-and', 'Name', 'myModel');
sfDSMData = m.find('-isa', 'Stateflow.Data', 'Scope', 'Data Store Memory');
  댓글 수: 4
Kaustubha Govind
Kaustubha Govind 2012년 11월 29일
You should be able to do:
sfDSMData(1).Scope = 'Input';
Nithin Kumar H M
Nithin Kumar H M 2022년 9월 14일
Thank you :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by