Matlab: Find area enclosed by points (x,y)

前端 未结 3 627
走了就别回头了
走了就别回头了 2021-01-21 14:27

I\'ve got 8 points that create the outline of an eight-sided polygon in two-dimensional space. I need to find the area enclosed be these points, but how do I do that using matla

相关标签:
3条回答
  • 2021-01-21 14:31

    For calculating area and even volume you can use convhull.

    0 讨论(0)
  • 2021-01-21 14:50

    You can use polyarea:

    ar = polyarea(B(:, 1), B(:, 2));
    
    0 讨论(0)
  • 2021-01-21 14:53

    I would go with trapezoid:

    Area = trapz(B(:,1),B(:,2));
    
    0 讨论(0)
提交回复
热议问题