As long as the curve is a sequence of points defining the perimeter and they are distinct, you can just compute the area using a tool like polyarea. Or you can create a polyshape, and then compute the area of that curve. Be careful though. You cannot apply any such tool (including trapz) to a randomly sequenced point cloud. They MUST be in sequence around the perimeter.
theta = linspace(0,2*pi,n);
Now compute the area.
The area of a circle of unit radius would be pi, so roughly 3.14. This will be a slight underestimate, becuase the polygonal region lies entirely inside the circle. So 3.1395 is decent.
The nice thing is polyarea does not care if the sequnce traverses the circle in a counter-clockwise or clockwise manner. That is, the above sequence went clockwise around the circle. So this next area, which is traversed in a clockwise manner, is also positive.
And we could have used a polyshape too.
ps = polyshape(x(1:end-1),y(1:end-1));
I dropped the last point from each of x and y there so polyshape would not get upset, since that point is essentially also the first point.