Publisher review:Points Inside polygone finds those points (xi,yi) who are inside the polygon, defined by the vectors (x,y) Find those points (xi,yi) who are inside the polygone defined by the vectors (x,y).Syntax: [xin,yin,Ind]=Inside(X,Y,xi,yi)where Ind is the index of (xi,yi) that are inside the polygoneExample:%--- create polygone (x,y)phi=linspace(0,2*pi,50);X=(1 0.2*sin(6*phi)).*cos(phi);Y=(1 0.2*sin(6*phi)).*sin(phi);%--- random points (xi,yi)Nr=20;xi=randn(1,Nr);yi=randn(1,Nr);[xin,yin,Ind]=Inside(X,Y,xi,yi);%--- plotplot(X,Y,X,Y,'.',xi,yi,'ro',xin,yin,'b.');axis equal; Requirements: ยท MATLAB Release: R13
Points Inside polygone is a Matlab script for Mathematics scripts design by Per Sundqvist.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris