Find Minimum Difference between consecutive values by reordering
Ältere Kommentare anzeigen
Hello, I just have a question where I cannot get my head around. Let's say I do have a Matrix containing the x and y coordinates of points. The coordinates as well as the order are random. So the dimension of the Matrix is [Number of Points,2]. What I would like to do is reorder this matrix under the constraint that the distance between subsequent points is minimum. Up to now I calculated the difference between subsequent points. However I have no idea how to find the optimal reordering to achieve the minimum distance between subsequent coordinates. Also my starting point is fixed to a specific value. Hopefully this is clear to you. I would be extremely grateful if any of you guys does have an idea how to tackle this problem. Thank you so much in advance.
1 Kommentar
per isakson
am 2 Dez. 2016
Akzeptierte Antwort
Weitere Antworten (1)
Alan Weiss
am 2 Dez. 2016
1 Stimme
I think that this might be the Travelling Salesman Problem. I mean, you say that you want to minimize each individual distance, but maybe you want to minimize the total distance.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Kommentar
Pat90
am 2 Dez. 2016
Kategorien
Mehr zu Nearest Neighbors finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
