MATLAB: Point contained in the convex hull of a quadrilateral convex hullquadrilateral Hellooo, how can i examine if a point in the 2D-Plane is in the convex hull of a quadriliteral, given from 4 points?? I know there is the function "convhull" but this only creates my konvex hull. Greetz, John Best Answer You can use the inpolygon() function. Related SolutionsMATLAB: How to use the inpolygon function ? X1=[0,0], X2=[2,0], X3=[2,2],X4=[0,2]X=[X1(1),X2(1),X3(1),X4(1)]Y=[X1(2),X2(2),X3(2),X4(2)]inpolygon(1,1,X,Y) % returns 1 because the point (1,1) is inside the polygoninpolygon(10,1,X,Y)% %returns 0 because the point (10,1) is outside the polygon MATLAB: Point or multiple points is/are in a triangle? tf = inpolygon(Points(:,1),Points(:,2),Triangle(:,1),Triangle(:,2)) Related QuestionTo calculate or estimate a center of a convex hull
Best Answer