?? shortest.m
字號:
%function p=shortest(startp,endp,Cost)
function p=shortest(startp,endp,Cost)
CrossPointNo=length(Cost);
[a b]=Shortest_Djk(Cost,CrossPointNo,startp);
%getpath用來顯示各點與起始點之間的最短路的路徑
%其中,a,b為Shortest_Djk()的返回值
p=getpath(a,b,startp,endp)
fprintf('路徑長度:%f',a(endp));
fprintf('\n');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -