% This is a simple ode integrator  
% it is set up to be easily modified to use for different dynamics
function  desolver

clear all
global   alf  
alf = 0.139;
 

 
tstep = 1;
t_end = 200;
U = 10;
 

%specify the output pooints
tspan = [0:tstep:t_end];

s0 = [U];  %  format s0 = [U;V;...] as a column vector

[T,S] = ode23(@deRHS,tspan, s0, odeset('maxstep',1));  
U = S(:,1);
 
%add nullclines if this is a 2-d system
 
 
figure(1)
 
semilogy(T,U)
 
xlabel('time')
ylabel('U')


p= polyfit(T,log(U),1)

%the right hand side for ode simulation:
function s_prime=deRHS(t,s)
global  alf  
U = s(1);
 
Uprime = -alf*U;
 
s_prime = [Uprime]';  
