%% Example of stiff,  a model of flame propagation 
%%
% 
% $$y''=y^2-y^3, y(0)=\delta, 0\ge t \ge 2/\delta $$
% 
% y(t) represents the radius of the ball.
%%
close all
%%
delta = 0.01;
F = @(t,y) y^2 - y^3;
opts = odeset('RelTol',1.e-4,'stats','on');
ode45(F,[0 2/delta],delta,opts);
%% Stiffness in action.
delta = 0.00001;
tic
ode45(F,[0 2/delta],delta,opts);
time=toc

%%
figure
delta = 0.00001;
tic
ode23s(F,[0 2/delta],delta,opts);
stime=toc

time/stime

