numRegions
알파 셰이프에 있는 영역 개수
설명
예제
2차원 알파 셰이프의 영역 개수 구하기
2차원 점 집합을 만들고 플로팅합니다.
th = (pi/12:pi/12:2*pi)'; x1 = [reshape(cos(th)*(1:5), numel(cos(th)*(1:5)),1); 0]; y1 = [reshape(sin(th)*(1:5), numel(sin(th)*(1:5)),1); 0]; x = [x1; x1+15;]; y = [y1; y1]; plot(x,y,'.') axis equal
알파 반지름 7을 사용하여 알파 셰이프를 만들고 여기에 있는 고유 영역의 개수를 쿼리합니다.
shp = alphaShape(x,y,7); nregions = numRegions(shp)
nregions = 1
더 작은 알파 반지름 2.5를 사용하면 경계를 더 잘 캡처한 다음 고유 영역의 개수를 새로 가져올 수 있습니다.
shp.Alpha = 2.5; nregions = numRegions(shp)
nregions = 2
알파 셰이프를 플로팅하여 경계 상태를 확인합니다.
plot(shp)
입력 인수
shp
— 알파 셰이프
alphaShape
객체
알파 셰이프로, alphaShape
객체로 지정됩니다. 자세한 내용은 alphaShape
를 참조하십시오.
예: shp = alphaShape(x,y)
는 (x,y)
점 좌표에서 2차원 alphaShape
객체를 만듭니다.
버전 내역
R2014b에 개발됨
참고 항목
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)