how to specify points outside a polygon?

조회 수: 2 (최근 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!

카테고리

Help CenterFile Exchange에서 Transportation Engineering에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by