How to calculate the area of the curve around a point?

3 views (last 30 days)
Cola
Cola on 11 Oct 2021
Commented: Cola on 16 Oct 2021
There is a curve, and the coordinates of each point of the curve is known. Is there a way to calculate the area of the curve around a point? Thanks!
For example, I plot a curve by Data.mat as shown below, and (0,20) is a point of attraction.
Now I want to calculate the area as shown below by Data.mat.
The whole area can be divided to these parts.

Accepted Answer

Image Analyst
Image Analyst on 11 Oct 2021
Someone just posted code from the Mathworks that does the local angle computation. See
  2 Comments
Cola
Cola on 16 Oct 2021
Eliminating iteration by code:
c1=Data(1:2000,:);
c2=Data(2:2001,:);
c=sqrt((c1(:, 1)-c2(:, 1)).^2+(c1(:, 2)-c2(:, 2)).^2)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!