Area of polygon
a = polyarea(
returns the area of the 2-D polygon defined by the vertices in vectors x
,y
)x
and y
.
If x
and y
are vectors of the same length,
then polyarea
returns the scalar area of the polygon defined by
x
and y
.
If x
and y
are matrices of the same size,
then polyarea
returns a row vector containing the areas of each
polygon defined by the columnwise pairs in x
and
y
.
If x
and y
are multidimensional arrays, then
polyarea
operates along the first dimension whose length is not
equal to 1.
The area value returned by polyarea
can depend on the order of
the input points.
inpolygon
| nsidedpoly
| polyshape
| rectint