Search and select points form each quadrant
3 次查看(过去 30 天)
显示 更早的评论
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. 

0 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!