-
Notifications
You must be signed in to change notification settings - Fork 99
polylineLength
David Legland edited this page Feb 28, 2022
·
1 revision
Return the length of a polyline given as a list of points.
L = polylineLength(POLY);
POLY
should be a N-by-D array, where N is the number of points and D is
the dimension of the points.
L = polylineLength(..., TYPE);
Specifies if the last point is connected to the first one. TYPE
can be
either 'closed' or 'open'.
L = polylineLength(POLY, POS);
Compute the length of the polyline between its origin and the position
given by POS
. POS
should be between 0 and N-1, where N is the number of
points of the polyline.
% Compute the perimeter of a circle with radius 1
polylineLength(circleAsPolygon([0 0 1], 500), 'closed')
ans =
6.2831