Finding pairs in an array of points.

조회 수: 9 (최근 30일)
Joshua Logan
Joshua Logan 2020년 5월 29일
답변: Dinesh Yadav 2020년 6월 2일
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
Ameer Hamza
Ameer Hamza 2020년 5월 29일
Can you share a small sample dataset?

댓글을 달려면 로그인하십시오.

답변 (1개)

Dinesh Yadav
Dinesh Yadav 2020년 6월 2일
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