%% Area of Polygon
% Create a set of points that define a 2-D polygon.

p = linspace(0,2.*pi,9);
x = 1.2*cos(p)';
y = 1.2*sin(p)'; 

% Plot the polygon.

plot(x,y);
axis equal

% Compute the area of the polygon.

a = polyarea(x,y)

% Copyright 2019 The MathWorks, Inc.