function A=my_triag(N);
A=zeros(N);
for i=2:N-1
    A(i,i)=2;
    A(i,i-1)=-1;
    A(i,i+1)=-1;
end
A(1,1)=2;A(1,2)=-1;
A(N,N)=2;A(N,N-1)=-1;