Need to find out Area of polygon

3 Ansichten (letzte 30 Tage)
Shweta Saboo
Shweta Saboo am 9 Sep. 2019
Beantwortet: Walter Roberson am 9 Sep. 2019
I want to calculate area of Polygon having dimensions [102.49728 126.58069 127.49728 126.58069 127.49728 163.58069 102.49728 163.58069].

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Sep. 2019
However, you do not appear to have X Y coordinates. If what you have is a polyhedra that is 102.49728 in one direction, 126.68069 in a second direction, 127.49728 in a third direction, and so on, then prod() the array.
However I am guessing you want
p = [102.49728 126.58069 127.49728 126.58069 127.49728 163.58069 102.49728 163.58069];
xy = reshape(p, 2, []).';
and then you could polyarea() on xy(:,1) and xy(:,2)

Weitere Antworten (0)

Kategorien

Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by