필터 지우기
필터 지우기

how to specify points outside a polygon?

조회 수: 4 (최근 30일)
Leon
Leon 2018년 5월 8일
답변: Leon 2018년 5월 8일
For example, in the below code, I can specify the points inside the polygon. How about outside the polygon? How do I specify that?
IN = inpolygon(lon, lat, x0, y0);
lon = lon(IN);
lat = lat(IN);
ph1 = ph1(IN);

채택된 답변

Walter Roberson
Walter Roberson 2018년 5월 8일
IN = inpolygon(lon, lat, x0, y0);
lon = lon(~IN);
lat = lat(~IN);
ph1 = ph1(~IN);

추가 답변 (1개)

Leon
Leon 2018년 5월 8일
Many thanks for the help!

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by