clear;
N=3;
for I = 1:N
    for J = 1:N
        if I == J		
        	A(I,J) = 2;
        elseif abs(I-J) == 1
        	A(I,J) = -1;
        else
        	A(I,J) = 0;
        end
    end 
end