TF = overlaps(poly1,poly2)
returns a logical array whose elements are 1 when the corresponding element pairs of
two polyshape arrays with compatible sizes overlap.
TF(i,j) is 1 when the ith
polyshape in poly1 overlaps the
jth polyshape in
poly2.
TF = overlaps(polyvec)
returns a logical array whose elements are 1 (true) when the
corresponding element pairs of a vector of polyshape objects
overlap. TF(i,j) is 1 when the ith
polyshape in polyvec overlaps the
jth polyshape.
Since the third polygon does not overlap either the first or second polygon, TF(1,3), TF(2,3), TF(3,1), and TF(3,2) are 0. The single point shared by the second and third polygon is not considered an overlapping region.
Overlap indicator, returned as a scalar, vector, matrix, or
multidimensional array.
If you input two polyshape arguments, then
they must have compatible sizes. For example, if two
polyshape vectors have different lengths
M and N, then they
must have different orientations (one must be a row vector and
one must be a column vector). TF is then
M-by-N or
N-by-M depending on
the orientation of each input vector. For more information on
compatible array sizes, see Compatible Array Sizes for Basic Operations.
If you input a single polyshape vector with
length N, then TF is
N-by-N.
Data Types: logical
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Dynamic memory allocation must be enabled for code generation.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.