Search and select points form each quadrant
1 回表示 (過去 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. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277865/image.bmp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277865/image.bmp)
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 で Statistics and Machine Learning Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!