Six cities in matlab with Dijkstra's Algorithm

Hi, I have a problem finding the correct way to do this. The question is: In matlab must solve the problem of finding the minimum path between six cities. It should be used for this Dkjistra algorithm. The distance between the cities must be stored in a 6x6 matrix. When there is no road between the cities, the corresponding value should be taken as an integer like (100000000000).
Any help plis?

回答 (1 件)

Cedric
Cedric 2013 年 8 月 26 日
編集済み: Cedric 2013 年 8 月 26 日

0 投票

Just use the FEX submission by Joseph Kirk that I used in this answer: http://www.mathworks.com/matlabcentral/answers/82034-how-do-i-detect-volume-collisions.
Build the C matrix based on connections between cities and distances, and A e.g. the way I build it in the aforementioned solution, and you're almost done.

カテゴリ

質問済み:

2013 年 8 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by