k-shortest path function

3 ビュー (過去 30 日間)
ahmed-wali
ahmed-wali 2013 年 5 月 6 日
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 件のコメント
Image Analyst
Image Analyst 2013 年 5 月 7 日
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.

サインインしてコメントする。

回答 (2 件)

Image Analyst
Image Analyst 2013 年 5 月 7 日
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 2013 年 5 月 11 日
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

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by