polyarea
Area of polygon
Description
a = polyarea(
returns the area of the 2-D polygon defined by the vertices in vectors x
,y
)x
and y
.
If
x
andy
are vectors of the same length, thenpolyarea
returns the scalar area of the polygon defined byx
andy
.If
x
andy
are matrices of the same size, thenpolyarea
returns a row vector containing the areas of each polygon defined by the columnwise pairs inx
andy
.If
x
andy
are multidimensional arrays, thenpolyarea
operates along the first dimension whose length is not equal to 1.
Examples
Input Arguments
Tips
The area value returned by
polyarea
can depend on the order of the input points.
Extended Capabilities
Version History
Introduced before R2006a
See Also
nsidedpoly
| polyshape
| inpolygon
| rectint