function [ut]=derv(neqn,t,u)
%
% Function derv computes the derivative vector
% of the 2 x 2 ODE problem
%
% Define global variables
  global ncall;
%
% Heading during first call to derv
  if ncall == 0
    fprintf('\n\n         Output from derv\n\n');
    fprintf('         t      u(1)      u(2)\n');
    fprintf('               ut(1)     ut(2)\n\n');
  end
%
% Display dependent variable vector
  fprintf('%10.4f%10.4f%10.4f\n',t,u(1),u(2));
%
% Problem parameters
  a=5.5;
  b=4.5;
%
% Derivative vector
  ut(1)=-a*u(1)+b*u(2);
  ut(2)= b*u(1)-a*u(2);
%
% Display derivative vector
  fprintf('%20.4f%10.4f\n\n',ut(1),ut(2));
%
% Increment counter for calls to derv
  ncall=ncall+1;
%
% Terminate execution after five calls to derv
  if ncall==5 dbstop in derv; end
