資源簡(jiǎn)介
復(fù)雜網(wǎng)絡(luò)中聚集系數(shù)的MATLAB實(shí)現(xiàn)方法,ClusteringCoefficient
代碼片段和文件信息
function?cc=ClusteringCoefficient(a)
n=size(a2);%a為鄰接矩陣
C=zeros(1n);
for?i=1:n
???aa=find(a(i:)==1);%與節(jié)點(diǎn)i相連的節(jié)點(diǎn)集合
???if?isempty(aa)
???????C(i)=0;
???else
???????m=length(aa);%i的度或者臨域維
- 上一篇:高斯光束matlab仿真
- 下一篇:8x8點(diǎn)DCT變換matlab代碼
評(píng)論
共有 條評(píng)論