필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
Jacob
Jacob 2014년 4월 11일
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개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by