how can i add the two different polyshape to another varriable and then can check the overlap between them ?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
is there any way out how can i get new varriable with two polyshapes ? one is circle other is polygon
0 Commenti
Risposte (2)
Steven Lord
il 26 Dic 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 Commenti
Image Analyst
il 26 Dic 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 Commenti
Vedere anche
Categorie
Scopri di più su Elementary Polygons in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!