If c is a contour obtained from a single isoline contourc
(see Matlab function "contourc"),
this checks if points with coordinates X and Y
are located IN the largest contour
or ON the outer boundaries of the largest contour.
A contour c is defined by:
c = [contour1 x1 x2 x3 ... contour2 x1 x2 x3 ...;
“hull_tree”
can for example produce such a contour and this can be used
to describe the spanning field of a neuronal tree
in the construction process.
#number_of_pairs y1 y2 y3 ... #number_of_pairs y1 y2 y3 ...]'
Example:
>> X = rand (10000,1)*150-20; Y = rand (10000,1)*150-30;
>> inc = in_c (X, Y, c); cplotter (c, [1 0 0]);
>> plot (X(inc), Y(inc), 'k.'); plot (X(~inc), Y(~inc), 'r.');
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License