How to analyze multiple points inside a polygon with the inpolygon() function
1 次查看(过去 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!