polyarea
Area of a polygon.
📝Syntax
a = polyarea(x, y)
a = polyarea(x, y, dim)
📥Input Arguments
Parameter Description
x, y the vertex coordinates of the polygon, as vectors or matrices of the same size.
dim a positive integer: the dimension along which the vertices run (default: the first non-singleton dimension).
📤Output Arguments
Parameter Description
a the area of the polygon.
📄Description

polyarea returns the area of the polygon whose vertices are given by x and y, computed with the shoelace formula. When the inputs are matrices, the area is computed for each polygon along the chosen dimension.

💡Examples
a = polyarea([0 1 1 0], [0 0 1 1])
🔗See Also
convhullboundary
🕔Version History
Version Description
2.0.0 Initial version.
Edit this page on GitHub