주요 콘텐츠

Simulink.BlockDiagram.arrangeSystem

블록 다이어그램의 레이아웃 개선

설명

Simulink.BlockDiagram.arrangeSystem(bd)는 블록을 재정렬하고, 블록의 크기를 조정하고, 블록을 이동하고, 신호 선을 곧게 펴서 지정된 블록 다이어그램의 레이아웃을 개선합니다.

참고

어떤 구문으로든 Simulink.BlockDiagram.arrangeSystem 함수를 실행하면 선 핸들이 변경됩니다.

예제

Simulink.BlockDiagram.arrangeSystem(bd,FullLayout=tf)는 자동화된 레이아웃이 원래 레이아웃보다 낫지 않은 경우에도 자동화된 레이아웃을 적용할지 여부를 지정합니다.

예제

예제

모두 축소

열려 있는 모든 모델에 Simulink.BlockDiagram.arrangeSystem을 사용할 수 있으며, 프로그래밍 방식으로 컴포넌트가 채워진 모델에 특히 유용합니다.

모델 ex_arrange_system의 블록이 제대로 정렬되어 있지 않습니다.

open_system('ex_arrange_system')

The model contains a Sine Wave block, a Pulse block, a Subsystem block, and a Scope block. The Scope block is on top of the Subsystem block, and none of the blocks are lined up. The Sine Wave and Pulse blocks connect to the Subsystem block, and the Subsystem block connects to the Scope block. The blocks are connected with diagonal signal lines. Two of the signal lines overlap.

이 모델의 서브시스템에 있는 블록도 제대로 정렬되어 있지 않습니다.

open_system('ex_arrange_system/Subsystem')

The subsystem contains two input port blocks, a Sum block, and an output port block. None of the blocks are lined up. The two input ports connect to the Sum block, and the Sum block connects to the output port block. The blocks are connected with diagonal signal lines. Two of the signal lines overlap.

지정된 시스템의 최상위 계층에서 블록을 프로그래밍 방식으로 정렬합니다.

Simulink.BlockDiagram.arrangeSystem('ex_arrange_system')

The blocks in the top layer of the model are neatly arranged, with the Sine Wave and Pulse blocks at the left, the Subsystem block in the middle, and the Scope block on the right. The connecting signal lines are exclusively composed of orthogonal line segments. No blocks or signal lines overlap.

Simulink.BlockDiagram.arrangeSystem('ex_arrange_system/Subsystem')

The blocks in the subsystem are neatly arranged, with the input port blocks blocks at the left, the Sum block in the middle, and the output port block on the right. The connecting signal lines are exclusively composed of orthogonal line segments. No blocks or signal lines overlap.

기본적으로 Simulink.BlockDiagram.arrangeSystem은 자동화된 레이아웃이 원래 레이아웃보다 나을 것으로 예상되는 경우에만 자동화된 레이아웃을 적용합니다. 이 함수를 사용하면 자동화된 레이아웃이 원래 레이아웃보다 낫지 않은 경우에도 레이아웃을 강제로 적용할 수 있습니다.

모델 ForceArrangeSystem의 블록이 잘 정렬되어 있습니다.

open_system('ex_arrange_system2')

The model contains a Sine Wave block and a Pulse block that connect to a Subsystem block. The Subsystem block connects to a Scope block. The blocks are neatly arranged, with the Sine Wave and Pulse blocks at the left, the Subsystem in the middle, and the Scope block at the right. The blocks are connected with signal lines that consist exclusively of orthogonal line segments.

블록이 이미 잘 정렬되어 있으므로 자동화된 레이아웃이 원래 레이아웃보다 낫지 않을 수 있습니다.

자동화된 레이아웃이 더 나은지 여부에 관계없이 자동화된 레이아웃을 적용하고 싶다고 가정하겠습니다. 자동화된 레이아웃을 강제로 적용하려면 FullLayouttrue로 설정하십시오.

Simulink.BlockDiagram.arrangeSystem('ex_arrange_system2',FullLayout='true')

The model has the same layout as before.

입력 인수

모두 축소

시스템의 블록 다이어그램으로, 문자형 벡터, string형 스칼라 또는 숫자형 스칼라로 지정됩니다.

다음 옵션 중 하나를 지정합니다.

  • 시스템 이름(경로나 확장자를 포함하지 않아야 함)

  • 시스템 핸들

  • Subsystem 블록 경로

데이터형: double | char | string

자동화된 레이아웃을 강제 적용하는 옵션으로, 'true' 또는 'false'로 지정됩니다.

  • 'true' — 자동화된 레이아웃이 원래 레이아웃보다 낫지 않을 수 있는 경우에도 자동화된 레이아웃 적용

  • 'false' — 자동화된 레이아웃이 원래 레이아웃보다 나을 것으로 예상되는 경우에만 자동화된 레이아웃 적용

버전 내역

R2018a에 개발됨