how to specify points outside a polygon?

2 views (last 30 days)
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);

Accepted Answer

Walter Roberson
Walter Roberson on 8 May 2018
IN = inpolygon(lon, lat, x0, y0);
lon = lon(~IN);
lat = lat(~IN);
ph1 = ph1(~IN);

More Answers (1)

Leon
Leon on 8 May 2018
Many thanks for the help!

Categories

Find more on Transportation Engineering in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!