%% Hexagon
% Create a hexagon with sides of length 1 centered at the point (0,0). Then, create a hexagon with sides of length 3 centered at (5,0).

pgon1 = nsidedpoly(6);
pgon2 = nsidedpoly(6,'Center',[5 0],'SideLength',3);
plot([pgon1 pgon2])
axis equal

% Copyright 2012 The MathWorks, Inc.