function faster than inpolygon()?

조회 수: 3 (최근 30일)
Reema Alhassan
Reema Alhassan 2018년 7월 3일
댓글: Reema Alhassan 2018년 7월 3일
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에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by