how can i add the two different polyshape to another varriable and then can check the overlap between them ?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
is there any way out how can i get new varriable with two polyshapes ? one is circle other is polygon
0 commentaires
Réponses (2)
Steven Lord
le 26 Déc 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 commentaires
Image Analyst
le 26 Déc 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 commentaires
Voir également
Catégories
En savoir plus sur Elementary Polygons dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!