Find Minimum Difference between consecutive values by reordering
Afficher commentaires plus anciens
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 commentaire
per isakson
le 2 Déc 2016
Réponse acceptée
Plus de réponses (1)
Alan Weiss
le 2 Déc 2016
1 vote
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 commentaire
Pat90
le 2 Déc 2016
Catégories
En savoir plus sur Nearest Neighbors dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
