how can i add the two different polyshape to another varriable and then can check the overlap between them ?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
is there any way out how can i get new varriable with two polyshapes ? one is circle other is polygon


0 comentarios
Respuestas (2)
Steven Lord
el 26 de Dic. de 2018
The line where that error occurred is
a(i) = polyin2;
Why are you trying to store your polyshape as a single element of the double array of coordinate data you used to create polyin1?
If you're using release R2018a or later, use the overlaps function to determine if they overlap, or call intersect to determine the intersection then calculate the area of that intersection.
You may be interested in this blog post which uses overlap calculation to determine if two states share a border.
0 comentarios
Image Analyst
el 26 de Dic. de 2018
Not sure how to do it with polyshapes, but if you want to use poly2mask() to create a digital image, then you could use & on the two binary images
binaryImage1 = polymask(x1, y1, rows, columns);
binaryImage2 = polymask(x2, y2, rows, columns);
overlapImage = binaryImage1 & binaryImage2;
0 comentarios
Ver también
Categorías
Más información sobre Elementary Polygons en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!