How to analyze multiple points inside a polygon with the inpolygon() function

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 个)

类别

帮助中心File Exchange 中查找有关 Mathematics 的更多信息

提问:

2014-4-11

Community Treasure Hunt

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

Start Hunting!

Translated by