shortest_distance_Dijkstra_algorithm.m
~This function can be used to find the shortest distance between nodes.
~ This function uses Dijkstra Algorithm.
~ This function can be used for Directional as well as Non-Directional graphs.
~This function contains five input algorithms.
% startid represents the starting node.
% finishid represents the end node.
%Weight_matrix denotes the weight matrix for different paths.
%startterminal_matrix and endterminal_matrix denotes the matrixes that are
%starting and end terminals arranged in line for example:
%Weight_matrix=[2 2 6 1 2 4 7 3 2 3 2];
%startterminal_matrix=[1 2 1 5 5 7 2 3 6 3 4];
%endterminal_matrix=[2 5 7 7 6 8 3 6 8 4 8];
%this will give following output
% (1,2) 2 (i.e path is from 1 to 2 with weight 2.)
% (2,3) 7
% (3,4) 3
% (2,5) 2
% (3,6) 3
% (5,6) 2
% (1,7) 6
% (5,7) 1
% (4,8) 2
% (6,8) 2
% (7,8) 4
Cita come
Alok Patel (2025). shortest_distance_Dijkstra_algorithm.m (https://it.mathworks.com/matlabcentral/fileexchange/46458-shortest_distance_dijkstra_algorithm-m), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Mathematics > Graph and Network Algorithms > Modify Nodes and Edges > Dijkstra algorithm >
- Sciences > Mathematics > Combinatorics > Graph Theory > Dijkstra Algorithm >
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
