Find the shortest distance in cluster group.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, i have a group of cluster, and the information of source and destination node. How can i find the shortest distance to the destination node and display the result?
This is my result:
start id = 18
finish id = 2
Group: 1
Members:
2 7 18
start id = 24
finish id = 8
Group: 2
Members:
1 8 10 12 15 16 24
start id = 14
finish id = 9
Group: 3
Members:
3 9 11 14
Hope someone can help and advice me.
Thanks
4 comentarios
Walter Roberson
el 9 de Oct. de 2018
Yes, dijkstra needs weights as well.
In some cases weights are all the same and can all be designated as 1, but probably not in your case: your weights are probably more like euclidean distances.
Respuestas (1)
KSSV
el 9 de Oct. de 2018
Read about pdist, pdist2 and knnsearch.
2 comentarios
Asyran Abdullah
el 9 de Oct. de 2018
Editada: Asyran Abdullah
el 9 de Oct. de 2018
Walter Roberson
el 10 de Oct. de 2018
Distance between what and what? What does the path mean? If those are start and end node numbers then why do they appear beside each other in the first and third path, but not beside each other in the second path ?
Ver también
Categorías
Más información sobre Dijkstra algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!