clear all
close all
tstar = 20;
A=[-100,0;0,-1];
y0 = [1;1];
ts = 4002;
k = tstar/ts;
y = zeros(2,ts+1);
y(:,1) = y0;
for n = 1:ts
    y(:,n+1) = y(:,n)+k*A*y(:,n); % Eul. espl.
%    y(:,n+1) = (eye(2)-k*A)\y(:,n); % Eul. impl.
end
t = linspace(0,tstar,ts+1);
plot(t,y(1,:),'*',t,y(2,:))
