.. highlightlang:: us .. _poly_is_point_in_polygon: poly_is_point_in_polygon ======================== .. index:: poly_is_point_in_polygon .. us.tag poly_is_point_in_polygon NOTREADYENGLISH base_graph New363 :ref:`poly_is_point_in_polygon` checks if a given point is inside or outside a closed polygon. .. function:: bInside = poly_is_point_in_polygon(x, y, xpoly, ypoly) .. us.return **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). .. us.params **Parameters** .. uparam:: x *x* is a vector of x coordinate to check, if inside. .. uparam:: y *y* is a vector of y coordinate to check, if inside. .. uparam:: xpoly *xpoly* is a vector with x coordinates of the closed hull. .. uparam:: ypoly *ypoly* is a vector with y coordinates of the closed hull. .. us.comment **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** .. list-table:: :header-rows: 1 * - Version - Description * - R2018.13 - *x*, *y* can be vector. .. seealso:: :ref:`poly_hull` :sub:`id-223843`