% testStiff2.m

clear all;
[t, Xvec] = ode45('stiffFcn2', [0, 4], [1, 0]);

Xexact = ( 1000*exp(-t) - exp(-1000*t) )/(1000-1);
plot(t,Xvec(:,1),'b.',t,Xvec(:,2),'kx',t,Xexact,'r-'); 
xlabel('t')
%str = '$\frac{1}{2}$';%'$\frac{dx(t)}{dt}$'; 
%legend('x(t)',str);