MATLAB 求最短路径利用graphshortestpath 可以求最短路径,具体用法参考MATLAB帮助 Examples:S=[1 1 2 2 3 3 4 4 4 4 5 6 6 7 8]; %起始节点向量E=[2 3 5 4 4 6 5 7 8 6 7 ...