M = 20; crange = 0.1:0.1:3; figure(1) clf subplot(1,2,1) N = 1e2; hold on for i=1:length(crange) for m=1:M G = sprandsym(N,crange(i)/N); G(G~=0)=1; [~, C] = graphconncomp(G); S = length(find(C==mode(C))); plot(crange(i),S,'.k') end end hold off box on xlabel('Mean links per node, c') ylabel('Giant component size, S') subplot(1,2,2) N = 1e4; hold on for i=1:length(crange) for m=1:M G = sprandsym(N,crange(i)/N); G(G~=0)=1; [~, C] = graphconncomp(G); S = length(find(C==mode(C))); plot(crange(i),S,'.k') end end hold off box on xlabel('Mean links per node, c') ylabel('Giant component size, S') eigs(G,100)