MATLAB Answers

I am trying to find area of this polygon, image is attached.. Can anyone tell how to use polyarea function on this ?I have pasted the code

1 view (last 30 days)
L K on 20 Mar 2017
Answered: Walter Roberson on 20 Mar 2017
polar(theta_rad, radius1, 'b*');
hold on;
[x, y] = pol2cart(theta_rad, radius1);
k = convhull(x, y);
xch = x(k);
ych = y(k);
[thetaCH1, rhoCH1] = cart2pol(xch, ych);
polar(thetaCH1, rhoCH1, 'ro-');

Answers (1)

Walter Roberson
Walter Roberson on 20 Mar 2017
polyarea cannot be used for that. polyarea assumes that each edge is linear, but the edges of a polar plot are mostly curved.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!