W = [2 8 1 1 6 5 1 2 3 6 4 9 3 7 9]; S = [0 0 0 1 1 3 3 3 5 5 6 4 6 2 2];S=S+1; T = [1 3 2 4 3 4 5 6 4 7 5 7 7 3 6];T=T+1; IDS={'u0','u1','u2','u3','u4','u5','u6','u7'}; DG = sparse(S,T,W,8,8)%求稀疏矩阵 UG =tril(DG+DG')%取矩阵和转置矩阵和的下三角矩阵. bg=biograph(UG,ID…