MATLAB: I want the points that located in a certain polygon

MATLABpolygon

Hey,
I have 92 points. Each point has latitude and longitude. On the other hand, I have a shape file consist of six different polygons. I want to know which point located in which polygon. For example, I want to have all points located in the first polygon.
filename ='Basin1_waterse_ir.shp'
S = shaperead(filename)
S =
6×1 struct array with fields:
Geometry
BoundingBox
X
Y
DEGREE1
HECTARES
AREA
PERIMETER
x0xE40xC70xE3
ACRES
Thank you all.

Best Answer

You use different order of lan/lot. Change places in red squares