How can I store polygons into a list?

8 ビュー (過去 30 日間)
RevengeOfTee
RevengeOfTee 2020 年 1 月 30 日
コメント済み: RevengeOfTee 2020 年 1 月 31 日
Say I have two polygons Pol1 and Pol2. How can I store them into a list that is used as an input for a function. My function, at some point, is supposed to be able to pick out polygons from this list and then graph them using polyshape.
Thank you!
Pol1 = [3 4; 1 1; 5 1];
Pol2 = [0 5; 5 5; 0 6; 6 3];

採用された回答

David Hill
David Hill 2020 年 1 月 31 日
Why not load them into a cell array?
Pol1 = polyshape([3 4; 1 1; 5 1]);
Pol2 = polyshape([0 5; 5 5; 0 6; 6 3]);
polyList={Pol1,Pol2};
  1 件のコメント
RevengeOfTee
RevengeOfTee 2020 年 1 月 31 日
Works. Thank you!

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

その他の回答 (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