how to specify points outside a polygon?

3 visualizzazioni (ultimi 30 giorni)
Leon
Leon il 8 Mag 2018
Risposto: Leon il 8 Mag 2018
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);

Risposta accettata

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

Più risposte (1)

Leon
Leon il 8 Mag 2018
Many thanks for the help!

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by