%% Perimeter of Polygon
% Create a polygon with one hole, and compute its perimeter.

V = [0 0; 0 2; 2 2; 2 0; NaN NaN; 0.5 0.5; 0.5 1.5; 1.5 1.5; 1.5 0.5];
polyin = polyshape(V);
plot(polyin)
axis equal
P = perimeter(polyin)

% Copyright 2012 The MathWorks, Inc.