Area of multiple polygons
1 回表示 (過去 30 日間)
古いコメントを表示
I have a cell which contains coordinates of different polygon,
Now i want to obtain the area of each individual polygon in the cell. How i can get that? I dont want the sum of area of all polygons, but want the area of individual polygons.
3 件のコメント
採用された回答
Stalin Samuel
2015 年 4 月 13 日
編集済み: Stalin Samuel
2015 年 4 月 13 日
for i1=1:26
data =mycoordinates{i1}%coordinate of i1th polygon
data(end+1,:) =data(1,:)
for i=1:max(size(data))-1
s(i)=data(i,1) *data(i+1,2)-data(i,2)*data(i+1,1)
end
area(i1) = abs(sum(s)/2)
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Elementary Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!