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
Solution Comments
Show comments
Loading...
Problem Recent Solvers86
Suggested Problems
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2536 Solvers
-
Project Euler: Problem 7, Nth prime
1750 Solvers
-
1611 Solvers
-
707 Solvers
-
Solving Quadratic Equations (Version 1)
504 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!
Do you mean "Coordinates in matrix are arranged in counter-clockwise direction"?
Yes. They are assumed to be in counter clockwise to match up with the test suites. Thanks. I have updated the definition.
Additional test cases have been added.