How to find Dijkstra shortest path for multiple source single destination problem?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to find Dijkstra shortest path form three different source nodes to single destination point and my input is netcost matrix.Please help me out to figure out this problem.
0 comentarios
Respuestas (2)
Walter Roberson
el 3 de Oct. de 2017
%create a graph for illustration
data = randi(15, 20, 2);
G = graph(data(:,1),data(:,2));
sources = [3, 8, 11];
dest = 14;
shortest_paths = shortestpathtree(G, sources, dest, 'outputform', 'cell');
shortest_paths will now be a cell array of paths.
0 comentarios
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!