How to reorganize blocks programmatically based on another block.

조회 수: 3 (최근 30일)
Hesam
Hesam 2018년 7월 4일
편집: TAB 2018년 7월 6일
Hi, I am trying to organize a model programmatically. Basically I want to reposition all the Inports/outports of a subsystem with respect to the inputs and outputs of a subsystem block. Here is an example of what I am trying to accomplish. Does anyone now of a simple way to do so?
Thank you very much in advance

답변 (2개)

Mark McBroom
Mark McBroom 2018년 7월 5일
You will need to write MATLAB code that uses find_system() to locate the subsystem, inports and outports, and then get_param(gcbh,'Position')/set_param(gcbh,'Position', ...) to obtain and change their location on the canvas.

TAB
TAB 2018년 7월 6일
편집: TAB 2018년 7월 6일
Check this submission on file exchange:
You can modify it to suite your need.

카테고리

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

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by