%    This is the file where you put the system of 
%    differential equations.  These
%    equations could be linear or nonlinear.  I 
%    using the following equations:
%    dx1/dt = x1 + x2 
%    dx2/dt = -x1*u + x2 + u
%
%    Note that it is necessary to put the line
%    dx = dx(:) 
%    at the end of the differential equations; otherwise
%    your program will not run. 
%    
%    Note that you are calling an external function (inp.m)
%    to compute u first.
%


function dx=nonlinear(t,x,x0)

u = inp(t);

dx(1) =  x(1)+ x(2);
dx(2) = -x(1)*u + x(2) + u;
dx    = dx(:);




