function cl=Cluster_coef2(M,thr,n_node)
%Clustering coefficient of a one node

n=size(M,2);
nodes=[];
for i=1:n
    if ((M(i,n_node)>thr)&&(i~=n_node))
        nodes=[nodes,i];
    end
end
len=length(nodes);
count=len;
for i=1:len
    for j=i+1:len
        if M(i,j)>thr
            count=count+1;
        end
    end
end
if (len<2)
    cl=0;
else
    cl= 2*count/(len*(len-1));
end