intersection area of 3 or more rectangles
Show older comments
hi all, I have multiple rectangles defined by rectangle()- function. I now want to find the intersection area of 3 rectangles (I know that for 2 rectangles rectint works). Alternatively it might be an option to find the intersection area of the intersection (rectangle 1, rectangle 2) with the rectangle 3.
Is there a funtion or simple solution for this problem?
Thanks!
Accepted Answer
More Answers (2)
Matt J
on 6 Mar 2021
If you put your rectangles in the form of a polyshape vector (I'll call it polyvec), then it is very easy:
Area = area(intersect(polyvec))
Categories
Find more on Polygonal Shapes in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!