function [q,p] = ee(dqdt,dpdt,tspan,q0,p0,varargin)
%EE Explicit Euler solver (trivial modification of seep)
%
%  See also SEEQ, SEEP, SEIP, GLS.

%  Francisco J. Beron-Vera, 28-Mar-2005
%  $Revision: 1.0 $  $Date: 28-Mar-2005 14:58:31 $
%  Trivial further modifications (not by the author) 2012

N = length(q0);  
Nt = length(tspan); 
hs = diff(tspan);
q = zeros(N,Nt); q(:,1)=q0;
p = zeros(N,Nt); p(:,1)=p0;
for nt = 2:Nt
   %t = tspan(nt-1); %if ~mod(nt,100), disp(['t = ' num2str(t)]), end
   h = hs(nt-1);
	p(:,nt) = p(:,nt-1) + h * feval(dpdt, q(:,nt-1), varargin{:}); 
   q(:,nt) = q(:,nt-1) + h * feval(dqdt, p(:,nt-1)  , varargin{:});
end
q = q.';
p = p.';