function Lambda = Gershgorin(A)

Lambda = 0;
n = size(A,1);

for i=1:n
    Lambdai = A(i,i) + (sum(abs(A(i,:))) - abs(A(i,i)));
    if Lambdai>Lambda
        Lambda = Lambdai;
    end
end
