%TODO: change the following two lines to target directories accordingly. path(path,'D:/MATLAB/meshpart'); path(path, 'D:/MATLAB'); n = 150; p = 0.01; %generating an symmetric random graph, which puts a link between two nodes %if the random number generated is less than p ( putting a link with probability of p) G = rand(n,n) < p; G = triu(G,1); G = G + G'; %giant component threshold , you should compare this to p, with my %predefined settings , p is greater than thres_giant thres_giant = 1/(n-1) %compute graph layout [x y] = draw_dot(G); %plot the graph gplot(G, [x' y'], '.-');