function ADJ = ADJRAND(N,opt,p)
    RAND = grand(N,N,"bin",1,p);
    if opt == [] then
        ADJ = RAND;
    else
        ADJ = ceil((RAND + eye(N,N))/2);  
    end
endfunction
