%
%
% PhysModMatlab.pdf, p. 108
%

  delta = 0.01;
  tic
  [t, y] = ode45(@(t,y) y^2-y^3, [0, 2/delta], delta);
  toc
  plot(t, y, '-o', 'LineWidth', 1, 'MarkerSize', 5); grid
  xlabel('t'), ylabel('y'), title('dy/dt = y^2-y^3)')
  length(y)
  
  pause;
  
  tic
  [t, y] = ode23s(@(t,y) y^2-y^3, [0, 2/delta], delta);
  toc
  plot(t, y, '-o', 'LineWidth', 1, 'MarkerSize', 5); grid
  xlabel('t'), ylabel('y'), title('dy/dt = y^2-y^3)')
  length(y)
