function [gs] = test1_matrizAa(a,n)
% funcion preg1, test 1, tema 1, 521230, S2-2012
gs = zeros(length(a),1);

for i = 1:length(a)
    A = create_trid(n,1,a(i),a(i));
    D = diag(diag(A));
    E = -tril(A) + D;
    F = -triu(A) + D;   
    GS = (D-E)\F;
    if max(abs(eig(GS))) < 1
        gs(i) = 1;
    end
end
    