フィルターのクリア

Error using digraph (line 214) Adjacency matrix must be square.

4 ビュー (過去 30 日間)
Waseem Hussain
Waseem Hussain 2017 年 10 月 25 日
Hi, I'm trying to create a biograph that will allow me to find the shortest path from one node to another, but when I try to create the biograph I keep getting an error.
Error using digraph (line 214) Adjacency matrix must be square
This is my code that I'm using,
W = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
DG = sparse ([1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 3 8 9 4 3 18 17 1 2 3 4 5 8 9 18 17 20 19 18 13 12 17 16 3 4 23 23 23 23 22 22 22 22], [2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 19 18 13 12 7 8 13 14 19 18 13 8 7 12 11 14 15 2 3 8 9 10 13 14 7 6 1 2 19 20 9 10 11 12], W )
h =view(biograph(DG))
Any help would be appreciated

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by