function faster than inpolygon()?

3 次查看(过去 30 天)
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 个评论
KSSV
KSSV 2018-7-3
intersection? How you are using inpolygon?
Reema Alhassan
Reema Alhassan 2018-7-3
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;

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Elementary Polygons 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by