필터 지우기
필터 지우기

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};

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by