A = [-100,0;0,-1];
tstar = 40;
tsrange = 500:100:2500;
counter = 0;
y0 = [1;1];
for ts = tsrange
  counter = counter+1;
  k = tstar/ts;  
  yee = y0;
  yei = y0;
  for n = 1:ts
    yee = (eye(2)+k*A)*yee;
    yei = (eye(2)-k*A)\yei;
  end
  erree(counter) = norm(yee-[exp(-tstar);exp(-100*tstar)],inf);
  errei(counter) = norm(yei-[exp(-tstar);exp(-100*tstar)],inf);
end
loglog(tsrange,erree,'o',tsrange,errei,'*',[2000,2000],[1e-50,1e300],'k')
h = text(2050,1e-35,'k < 2/100');
legend('Eulero esplicito','Eulero implicito')
xlabel('m')
ylabel('errore in norma infinito')