Optimization_Toolbox使用问题
古いコメントを表示
显示已经成功安装了Optimization_Toolbox工具箱和全局Optimization_Toolbox工具箱,但是在调用graphallshortestpaths时出现如下报错:“函数或变量 'graphallshortestpaths' 无法识别。”在命令行中输入“>> which graphallshortestpaths"显示“未找到 'graphallshortestpaths'。”



回答 (2 件)
Hi @蒙恩
W = [.41 .99 .51 .32 .15 .45 .38 .32 .36 .29 .21];
DG = sparse([6 1 2 2 3 4 4 5 5 6 1],[2 6 3 5 4 1 6 3 4 3 5], W);
G = digraph(DG);
plot(G)
d = distances(G)
Compare result with graphallshortestpaths:

カテゴリ
ヘルプ センター および File Exchange で Language Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

