
function [Lamb]=Spect(A)
    D=diag(diag(A))
    L=tril(A)-D
    U=triu(A)-D
    Rj=-inv(D)*(L+U)
    Lamb=abs(spec(Rj))
endfunction

function [LambM]=RSpec(Lamb)
    Lamb=gsort(Lamb)
    LambM=Lamb(1)    
endfunction

function [l]=mLamb(LambM)
    l=round(abs(8/log(LambM)))
endfunction