Search and select points form each quadrant

조회 수: 2 (최근 30일)
giometar
giometar 2020년 3월 18일
답변: darova 2020년 3월 18일
Hello
How to select two or any number of nearest points from each quadrant?
I have point T and I want to select only two nearest points from each quadrant.

답변 (1개)

darova
darova 2020년 3월 18일
You can use pdist2 for this purpose
D = pdist2([xt yt],[x(:) y(:)]);
ix = D < 1;
plot(x(ix),y(ix),'or')
hold on
plot(x,y,'.b')
hold off

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by