Main Content

rmholes

polyshape에서 구멍 제거

설명

예제

polyout = rmholes(polyin)은 구멍 경계가 모두 제거된 상태의 다각형 polyin의 채워진 경계로 구성된 polyshape 객체를 반환합니다.

예제

모두 축소

구멍이 있는 다각형을 만듭니다.

t = 0.05:0.5:2*pi;
x1 = cos(t);
y1 = sin(t);
x2 = 0.5*cos(t);
y2 = 0.5*sin(t);
polyin = polyshape({x1,x2},{y1,y2})
polyin = 
  polyshape with properties:

      Vertices: [27x2 double]
    NumRegions: 1
      NumHoles: 1

plot(polyin)

Figure contains an axes object. The axes object contains an object of type polygon.

구멍이 제거된 새 다각형을 만듭니다.

polyout = rmholes(polyin)
polyout = 
  polyshape with properties:

      Vertices: [13x2 double]
    NumRegions: 1
      NumHoles: 0

plot(polyout)

Figure contains an axes object. The axes object contains an object of type polygon.

입력 인수

모두 축소

입력 polyshape로, 스칼라, 벡터, 행렬 또는 다차원 배열로 지정됩니다.

데이터형: polyshape

확장 기능

버전 내역

R2017b에 개발됨

참고 항목

| | |