how to specify points outside a polygon?

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);

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 8 Mai 2018

0 Stimmen

IN = inpolygon(lon, lat, x0, y0);
lon = lon(~IN);
lat = lat(~IN);
ph1 = ph1(~IN);

Weitere Antworten (1)

Leon
Leon am 8 Mai 2018

0 Stimmen

Many thanks for the help!

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by