function faster than inpolygon()?

3 vues (au cours des 30 derniers jours)
Reema Alhassan
Reema Alhassan le 3 Juil 2018
Commenté : Reema Alhassan le 3 Juil 2018
Is there a function faster than inpolygon()? or another way to do the intersection ? because it sometimes takes too much time (the program sill busy forever ).
Thank you.
  2 commentaires
KSSV
KSSV le 3 Juil 2018
intersection? How you are using inpolygon?
Reema Alhassan
Reema Alhassan le 3 Juil 2018
here is the code to understand what I mean :
[A,x,y,I]=geoimread('Cutted1.tif')
rx = shape(1).X(1:end-1);
ry = shape(1).Y(1:end-1);
[X,Y] = meshgrid(x,y);
mask =inpolygon(X,Y,rx,ry);
result= mask.*A;

Connectez-vous pour commenter.

Réponses (0)

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!

Translated by