function [T, Y] = myEuler(f, Y0, tTotal, N)
%
%  myEuler(f, Y0, tTotal, N): Implementation of the forward Euler Method 
%                                          
%   Math 430 * Math 635 * Lecture 7 * Sep 24, 2015 * Victor Matveev  
% ********************************************************************

h = tTotal / N;  % Calculate the time step

Y(1) = Y0;       % Initial condition
T(1) = 0;        % Initial time

for n = 2 : N + 1
   Y(n) = Y(n-1) + h * f(Y(n-1));  % New = Old + Time_step * Velocity
   T(n) = T(n-1) + h;              % Advance time (try to get rid of this)
end


