how to specify points outside a polygon?

4 visualizaciones (últimos 30 días)
Leon
Leon el 8 de Mayo de 2018
Respondida: Leon el 8 de Mayo de 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);

Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Mayo de 2018
IN = inpolygon(lon, lat, x0, y0);
lon = lon(~IN);
lat = lat(~IN);
ph1 = ph1(~IN);

Más respuestas (1)

Leon
Leon el 8 de Mayo de 2018
Many thanks for the help!

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by