k-shortest path function

3 visualizzazioni (ultimi 30 giorni)
ahmed-wali
ahmed-wali il 6 Mag 2013
just downloaded k-shortest path function and would like to see an example (3 to 4 nodes) showing how this function is used. many thanks
  1 Commento
Image Analyst
Image Analyst il 7 Mag 2013
I don't know what that is. You didn't list a toolbox, so is it something you found in the File Exchange? I don't know all the files in there - neither does anyone else.

Accedi per commentare.

Risposte (2)

Image Analyst
Image Analyst il 7 Mag 2013
Steve has a nice blog series about shortest paths: http://blogs.mathworks.com/steve/2011/11/01/exploring-shortest-paths-part-1/

ahmed-wali
ahmed-wali il 11 Mag 2013
yes i have downloaded this function from the file exchange and its called "kShortestPath_Yen's algorithm". i have used this function to find the 2-shortest paths between 2 nodes. here is the distance matrix i'm using
M =
Inf 20 30 Inf Inf Inf
20 Inf Inf 10 15 Inf
30 Inf Inf 12 Inf 60
Inf 10 12 Inf 25 Inf
Inf 15 Inf 25 Inf 70
Inf Inf 60 Inf 70 Inf
example for 2-shortest path between node 1 and 6, matlab is giving me the result below ans =
[1x3 double] [1x5 double]
and i can't make sense of it. i'm looking for a function that can calculate the weights of the shortest paths. many thanks

Categorie

Scopri di più su Downloads in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by