k-shortest path function

조회 수: 1 (최근 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 CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by