intersection area of 3 or more rectangles
Mostrar comentarios más antiguos
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!
Respuesta aceptada
Más respuestas (2)
darova
el 5 de Mzo. de 2021
0 votos
Try polyxpoly with for loop
Matt J
el 6 de Mzo. de 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))
Categorías
Más información sobre Polygonal Shapes en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
