Finding pairs in an array of points.

11 visualizaciones (últimos 30 días)
Joshua Logan
Joshua Logan el 29 de Mayo de 2020
Respondida: Dinesh Yadav el 2 de Jun. de 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 comentario
Ameer Hamza
Ameer Hamza el 29 de Mayo de 2020
Can you share a small sample dataset?

Iniciar sesión para comentar.

Respuestas (1)

Dinesh Yadav
Dinesh Yadav el 2 de Jun. de 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