Points Inside polygone

Finds those points (xi,yi) who are inside the polygon, defined by the vectors (x,y)
2K download
Aggiornato 22 nov 2004

Nessuna licenza

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 polygone

Example:

%--- 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);
%--- plot
plot(X,Y,X,Y,'.',xi,yi,'ro',xin,yin,'b.');axis equal;

Cita come

Per Sundqvist (2024). Points Inside polygone (https://www.mathworks.com/matlabcentral/fileexchange/6311-points-inside-polygone), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R13
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Elementary Polygons in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0