inpoly
INPOLY
Select dataset objects inside / outside a polygon in a scatter plot
[JIN,JOUT] = INPOLY(A,H)
Input | A | 2D dataset | H | handle returned by IMPOLY |
Output | JIN | Object indices of A inside polygon | JOUT | Object indices of A outside polygon |
Description The purpose of this routine is to find the objects inside / outside a polygon created by IMPOLY on a scatterplot, e.g. created by SCATTERD. Example(s)
delfigs
a = gendatb;
scatterd(a)
disp('Draw a polygon in the scatterplot')
h = impoly; % use the mouse to draw a polygon in the scatterplot
[jin,jout] = inpoly(a,h);
hold on; scatterd(a(jin,:),'ko'); % encircle selected objects
figure; scatterd(a(jout,:)); % show objects outside polygon
showfigs
See also
scatterd, impoly, This file has been automatically generated. If badly readable, use the help-command in Matlab. |
|