function spreadingability=sir(A,beta,mu) for i=1:length(A) for N=1:50%随机次数 InitialState=zeros(length(A),1);InitialState(i)=1; time=5;%传播时间 I(N,:)=sire(A,InitialState,beta,mu,time); end spreadingability(i,1)=mean(mean(I));%节点i的传播能力 end end function I=…