필터 지우기
필터 지우기

How to make united polygons from separated polygons?

조회 수: 8 (최근 30일)
Smithy
Smithy 2021년 2월 5일
답변: KSSV 2021년 2월 5일
I have 3 separated polygons of each variables (Polygon#1, Polygon#2,Polygon#3).
I would like to make one united polygon from 3 separated polygons as the picture.
I tried with union funtion of matlab, but it works only for contacted Polygon.
Please give me some helps or hints...

채택된 답변

KSSV
KSSV 2021년 2월 5일
Let P1,P2,P3 be your three polygons data which I am assuming as column dominant.
P = [P1; P2; P3] ; % merge the data
idx = boundary(P(:,1),P(:,2)) ;
P = P(idx,:) ;
plot(P(:,1),P(:,2))
The above shall work if not share the data.

추가 답변 (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