How select data just out from a polygon, considering a constraint
古いコメントを表示
borders % matrix 20x2 with the x and y coordinates of the generic polygon perimeter
datas % matrix 550x2 containing the x and y coordinates of all my datas
Using the function "inpolygon" I'm able to find all the points of "datas" that are inside the polygon perimeter defined by "borders".
However, I also want to take into account all the points that are outside the polygon and near the perimeter.
More precisely, I want to consider all the points outside the polygon for which the distance in x is lower than 0.3 and the distance in y is lower than 0.1, with respect to the border.
Hoping to be clear, thanks for help!
採用された回答
その他の回答 (1 件)
KSSV
2021 年 9 月 13 日
0 投票
Read about knnsearch. This will give you indices of points lying closer to the given set of points from a set of points along with distances. You can play around with distances obtained from here.
カテゴリ
ヘルプ センター および File Exchange で Polygonal Shapes についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!