在matlab中调试此代码

在matlab中调试此代码,matlab,debugging,graph-theory,Matlab,Debugging,Graph Theory,我收到一条错误消息,说明以下内容 W = [.41 .99 .51 .32 ]; DG = sparse([4 4 2 2 ],[1 3 1 3],W); view(biograph(DG,[],'ShowWeights','on')); 读取错误消息,DG是4x3矩阵而不是方形矩阵 Error using ==> biograph.biograph at 155 CM must be a sparse or full square matrix Error in ==>

我收到一条错误消息,说明以下内容

 W = [.41 .99 .51 .32 ];
 DG = sparse([4 4 2 2 ],[1 3 1 3],W); 
 view(biograph(DG,[],'ShowWeights','on'));
读取错误消息,DG是4x3矩阵而不是方形矩阵

Error using ==> biograph.biograph at 155
CM must be a sparse or full square matrix

Error in ==> Untitled2 at 4
view(biograph(DG,[],'ShowWeights','on'))