function [bus_connect,connect_m]=get_connect(line,nob,nol)
%OUTPUT: bus_connect(i,1) corresponds to the number of bus connected to 
%                         bus i plus one
%        connect_m(i,j)   0 means bus i and bus j not connected
%                         1 means bus i and bus j  connected
%                         connect_m(i,i) always assigned zero

bus_connect=zeros(nob,1);
connect_m=zeros(nob,nob);
for i=1:nol
    m=line(i,1);
    n=line(i,2);
    bus_connect(m,1)=bus_connect(m,1)+1;
    bus_connect(n,1)=bus_connect(n,1)+1;
    connect_m(m,n)=1;connect_m(n,m)=1;
end