function [a,b]=degredistr2k(degr_distr);
%
n=length(degr_distr);
x=[];
y=[];
for i=1:n
    if (degr_distr(i)>0)
        x=[x log(i)];
        y=[y log(degr_distr(i))];
    else
        continue;
    end
end
coef=polyfit(x,y,1);
a=coef(2);
b=coef(1);
%y1=ones(1,n)*a+b*x;
%figure;
%plot(y);
%hold on;
%plot(y1);
