poly_is_point_in_polygon¶
poly_is_point_in_polygon checks if a given point is inside or outside a closed polygon.
-
bInside = poly_is_point_in_polygon(x, y, xpoly, ypoly)
Return Value
bInside is a vector with the same length as x, y. Is is TRUE (1) if the given point is inside the polygon and otherwise FALSE (0).
Parameters
-
x
x is a vector of x coordinate to check, if inside.
-
y
y is a vector of y coordinate to check, if inside.
-
xpoly
xpoly is a vector with x coordinates of the closed hull.
-
ypoly
ypoly is a vector with y coordinates of the closed hull.
Comment
If a point is “exactly” on an edge (bounary) of a polygon, it is possible that the function returns TRUE (inside) or FALSE (outside).
History
Version | Description |
---|---|
R2018.13 | x, y can be vector. |
See also
id-223843