用MATLAB怎样画无向加权图呀?求解...
CMatrix=[0 3 20 0 0;1 0 0 6 8;1 0 0 0 0;0 0 0 0 1;0.5 0 2 0 0];NodeIDs={'N1','N2','N3','N4','N5'};%节点标签,也就是h.Nodes(i).ID属性值
ShowWeightsValue='on';%'off';%控制是否显示权值
BGobj = biograph(CMatrix, NodeIDs, 'ShowWeights', ShowWeightsValue);
h=view(BGobj);
set(h.Nodes(1:5),'shape','circle');
这样画出来是有向图啊!