how can generate an adjacent rectangle ?

4 ビュー (過去 30 日間)
tty
tty 2022 年 9 月 13 日
編集済み: Matt J 2022 年 9 月 13 日
starting from a rectangular region in the state space (2D) , how can I generate an adjacent rectangle to it in every iteration?
I will be very gratefull for any help

採用された回答

Matt J
Matt J 2022 年 9 月 13 日
編集済み: Matt J 2022 年 9 月 13 日
You haven't said how the rectangle is being represented as a Matlab variable. If it is a polyshape object , you can use translate, e.g.,
L=1;
rect1=nsidedpoly(4,'SideLength',L);
rect2=translate(rect1, L,0);
rect3=translate(rect1, 0,L);
plot([rect1,rect2, rect3]) %Three adjacent rectangles

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by