regions
polyshape
영역 액세스
설명
예제
다각형 영역으로 구성된 배열
2개의 채워진 영역이 있는 다각형을 계산합니다. 그런 다음 다각형의 채워진 영역 하나를 요소로 갖는 벡터를 만듭니다.
P = [0 0; 0 2; 2 2; 2 0; NaN NaN; 0.5 0.5; 0.5 1.5; 1.5 1.5; 1.5 0.5; NaN NaN; 3 0.5; 3.5 1.5; 4 0.5; NaN NaN; 3.25 0.6; 3.75 0.6; 3.5 1]; polyin = polyshape(P); plot(polyin) xlim([-0.5 4.5]) ylim([-0.5 2.5])
polyout = regions(polyin)
polyout = 2x1 polyshape array with properties: Vertices NumRegions NumHoles
plot(polyout(1)) xlim([-0.5 4.5]) ylim([-0.5 2.5])
plot(polyout(2)) xlim([-0.5 4.5]) ylim([-0.5 2.5])
입력 인수
polyin
— 입력 polyshape
스칼라
입력 polyshape
로, 스칼라로 지정됩니다.
데이터형: polyshape
버전 내역
R2017b에 개발됨
참고 항목
boundary
| sortregions
| polyshape
| holes
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)