Placing multiple rectangles layout

19 ビュー (過去 30 日間)
ali demirkaya
ali demirkaya 2018 年 10 月 9 日
回答済み: KSSV 2018 年 10 月 10 日
Hi.The rectangle on the right side is added later. How should I follow an algorithm that adding this rectangle? The quadrilateral will be placed in an empty area and Multiple rectangles will be placed.
  1 件のコメント
jonas
jonas 2018 年 10 月 9 日
編集済み: jonas 2018 年 10 月 9 日

サインインしてコメントする。

回答 (2 件)

ANKUR KUMAR
ANKUR KUMAR 2018 年 10 月 10 日
figure
rectangle('Position',[1 1 2 4],'Curvature',0)
rectangle('Position',[5 2 4 3],'Curvature',0)
rectangle('Position',[5 6 4 3],'Curvature',[1 1])
axis([0 10 0 10])

KSSV
KSSV 2018 年 10 月 10 日
R1 = [1 1; 6 1 ; 6 7 ; 1 7 ] ;
R2 = [7 1 ; 10 1 ;10 8 ; 7 8] ;
figure
hold on
patch(R1(:,1),R1(:,2),'w')
patch(R2(:,1),R2(:,2),'w')
If you have more coordinates/ vertices of rectangle keep adding onto the figure.

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by