pi = 4*atan(1) % a standard way of computing pi

t_i = 0; % initial time
t_f = 5; % final time

nsteps = 1000; % number of integration steps

dt = (t_f - t_i) / nsteps; %integration time step

% initial conditions
t(1) = t_i;
y(1) = 0.1; 

for n = 1:nsteps 
    t(n+1) = t(n) + dt % increment time
    y(n+1) = y(n) + dt*func(t(n),y(n)) % compute new y
end

plot (t,y,'k'); hold on;
fplot('exp(t)',[0,5],'b');
