How to analyze multiple points inside a polygon with the inpolygon() function
4 ビュー (過去 30 日間)
古いコメントを表示
Hi community, I am trying to analyze a set of points inside a polygon and im not sure how to do it. This is the domain i want to analyze:
xcoords=-0.2:0.01:1.2;
ycoords=-0.7:0.1:0.7;
%call meshgrid to create 2D matrices for x,y mesh
mesh1=meshgrid(xcoords,ycoords); %We assign to the variables mesh1&2 the grids created by the function meshgrid taking as reference the discretize domain we chose (x,y)
mesh2=meshgrid(ycoords,xcoords)';
Inside this domain there is a polygon, say its a random polygon of 250 vertices(x,z). How can i use the function inpolygon to evaluate whether all the points in my domain are inside the polygon or not.
Thank you
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!