Problem 42699. Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the points.
Example:
A = [1 2;4 5; 6 7], represents points (1,2),(4,5) and (6,7)
Note :
- There are no repeated rows in matrix.
- There are at least 3 rows in matrix.
- Coordinates in matrix are arranged in counter-clockwise direction.
Solution Stats
Problem Comments
-
3 Comments
George-Felix Leu
on 2 Jan 2016
Do you mean "Coordinates in matrix are arranged in counter-clockwise direction"?
Shishir Patel
on 3 Jan 2016
Yes. They are assumed to be in counter clockwise to match up with the test suites. Thanks. I have updated the definition.
goc3
on 2 Jan 2018
Additional test cases have been added.
Solution Comments
Show commentsProblem Recent Solvers80
Suggested Problems
-
Program an exclusive OR operation with logical operators
713 Solvers
-
543 Solvers
-
Find out missing number from a vector of 9 elements
295 Solvers
-
253 Solvers
-
779 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!