使用matlab实现最小生成树% Create an undirected graph with 6 nodes
S=[1 1 2 2 3 4 4 5 5 6 6];%起始节点向量
E=[2 6 3 5 4 1 6 3 4 2 5]; %终止节点向量
W = [.41 .29 .51 .32 .50 .45 .38 .32 .36 .29 .21];%边权值向量
DG = sparse(S,E,W);
view(biograph(DG,[],'ShowArrows','off','ShowWeights','on'))