function network(x)

n=(1+sqrt(1+8*(size(x,2))))/2;
Px=vect2mat(x);
for i=1:n-1
    for j=i+1:n
        if Px(i,j)==1
            plot([cos(2*pi*(i-1)/n) cos(2*pi*(j-1)/n)],[sin(2*pi*(i-1)/n) sin(2*pi*(j-1)/n)]);
            hold on;
        end
    end
end

for i=1:n
    x=cos(2*pi*(i-1)/n);
    y=sin(2*pi*(i-1)/n);
    plot(x,y,'o');
    if abs(y) < 10^-2
        if x > 0
            text(x+0.03,y,int2str(i),'HorizontalAlignment','center','FontSize',14);
        else
            text(x-0.03,y,int2str(i),'HorizontalAlignment','center','FontSize',14);
        end
    elseif y > 10^-2
        if x > 10^-2
            text(x+0.03,y+0.03,int2str(i),'HorizontalAlignment','center','FontSize',14);
        elseif x < -10^-2
            text(x-0.03,y+0.03,int2str(i),'HorizontalAlignment','center','FontSize',14);
        else
            text(x,y+0.03,int2str(i),'HorizontalAlignment','center','FontSize',14);
        end
    else
        if x > 10^-2
            text(x+0.03,y-0.03,int2str(i),'HorizontalAlignment','center','FontSize',14);
        elseif x < -10^-2
            text(x-0.03,y-0.03,int2str(i),'HorizontalAlignment','center','FontSize',14);
        else
            text(x,y-0.03,int2str(i),'HorizontalAlignment','center','FontSize',14);
        end
    end
    hold on;
end
axis([-1.05 1.05 -1.05 1.05])
set(findobj('Type','line'),'LineWidth',1.2,'Color','b','MarkerSize',8,'MarkerFaceColor','b','MarkerEdgeColor','b');
hold off
