function y=imp(h,k)

     lam=k/h^2;
     N=1/h+1;
     A=zeros(N);
     A(1,1)=1;
     A(N,N)=1;
     for i=2:(N-1)
     A(i,i)=1+2*lam;
     A(i,i-1)=-lam;
     A(i,i+1)=-lam;
     end
     y=zeros(N,100);
for i=1:N
     y(i,1)=sin(2*pi*(i-1)*h);
end
     for i=1:99
y(:,i+1)=inv(A)*y(:,i);
end
end
