how to specify points outside a polygon?

4 ビュー (過去 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!

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by