tril showing dimension error

조회 수: 8 (최근 30일)
Suchetana Gupta
Suchetana Gupta 2015년 5월 28일
I have an excel file where column 1 has values between 1-198 (not all of 1-198 are there and some values are repeating) and column 2 similarly has 1-198 values (again with absence of some and repetition of some). The third column has the associated edge weights. I want to create a graph from it and am using the formula: w=[]; DG=sparse([],[],w); UG=tril(DG+DG');
(My excel sheet obviously has same number of values on all three columns)
(My system thus has 198 nodes and I am willing to make a network where each node is connected to every other node in it, except itself and the one whose node number is i+1,i.e. for n nodes, I should be expecting n(n-2) connections, right?)
The tril operation is showing dimension error. Where am I going wrong?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Undirected Graphs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by