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
return 2*count/(n*(n-1));