Dijkstra Algorithm
버전 1.0.0.0 (2.57 KB) 작성자:
Dimas Aryo
Dijstra algorithm to solve shortest path problem.
This algorithm is to solve shortest path problem.
Usage
[cost rute] = dijkstra(graph, source, destination)
note : graph is matrix that represent the value of the edge. if node not connected with other node, value of the edge is 0.
example:
Finding shortest path form node 1 to node 7.
>> G = [0 3 9 0 0 0 0;
0 0 0 7 1 0 0;
0 2 0 7 0 0 0;
0 0 0 0 0 2 8;
0 0 4 5 0 9 0;
0 0 0 0 0 0 4;
0 0 0 0 0 0 0;
];
>> [cost rute] = dijkstra(G,1,7)
it will resulting
cost = 15
rute = [7 6 4 5 2 1]
인용 양식
Dimas Aryo (2026). Dijkstra Algorithm (https://kr.mathworks.com/matlabcentral/fileexchange/36140-dijkstra-algorithm), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
개발 환경:
R14SP1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux카테고리
- MATLAB > Mathematics > Graph and Network Algorithms > Modify Nodes and Edges > Dijkstra algorithm >
- Sciences > Mathematics > Combinatorics > Graph Theory > Dijkstra Algorithm >
Help Center 및 MATLAB Answers에서 Dijkstra algorithm에 대해 자세히 알아보기
태그
| 버전 | 게시됨 | 릴리스 정보 | |
|---|---|---|---|
| 1.0.0.0 |
