MATLAB Answers

Finding pairs in an array of points.

15 views (last 30 days)
Joshua Logan
Joshua Logan on 29 May 2020
Answered: Dinesh Yadav on 2 Jun 2020
Alright, so I'm calibrating sensors that get paired off by similar coefficients. I have around a hundred at a time that I am working with and I'm looking for an easier way to generate these pairings (I currently do it by eye). I would like to make my script output the most effecient pairing of these points to maximize the number of pairs I can make, the points need to be within .001 in the y and .2 in the x. How can I do this?

  1 Comment

Ameer Hamza
Ameer Hamza on 29 May 2020
Can you share a small sample dataset?

Sign in to comment.

Answers (1)

Dinesh Yadav
Dinesh Yadav on 2 Jun 2020
Hi Joshua,
You can refer to the dsearchn function in MATLAB. Include x,y pair of data from both sets to make data points, then select one sensor data points as query points and correspondingly the closest points to those query points can be found. Also distance from each query point can also be found and put a condition to keep only the data points less than the distance described above. More insights can only be given after seeing your dataset as Ameer asked.
Hope it helps.

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!