MATLAB Answers

Search and select points form each quadrant

2 views (last 30 days)
giometar on 18 Mar 2020
Answered: darova on 18 Mar 2020
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.

Answers (1)

darova on 18 Mar 2020
You can use pdist2 for this purpose
D = pdist2([xt yt],[x(:) y(:)]);
ix = D < 1;
hold on
hold off

Community Treasure Hunt

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

Start Hunting!