Finding pairs in an array of points.

10 vues (au cours des 30 derniers jours)
Joshua Logan
Joshua Logan le 29 Mai 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 commentaire
Ameer Hamza
Ameer Hamza le 29 Mai 2020
Can you share a small sample dataset?

Connectez-vous pour commenter.

Réponses (1)

Dinesh Yadav
Dinesh Yadav le 2 Juin 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.

Community Treasure Hunt

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

Start Hunting!

Translated by