%% Compare Polygons
% Create three polyshape objects. First, determine if the two objects poly1 and poly2 are equal. Then, compare all three. Equal polyshape objects must have equal vertices and boundary types.

poly1 = polyshape([0 0 1 1],[1 0 0 1]);
poly2 = polyshape([0 0 1 1],[1 0 0 1]);
poly3 = polyshape([0 0 1 1],[1 0 0 2]);
TF = isequal(poly1,poly2)
TF = isequal(poly1,poly2,poly3)

%
% Copyright 2012 The MathWorks, Inc.