function [ x ] = e73( dt,f,x0,a )
% MATLAB Function that uses Explicit Euler to solve the ODE x'=f(x,a)
% where a is a parameter of the function

% INPUT: dt time-step
% f function
% x0 initial value x(0)
% a parameter of the function

N=1/dt;
x=zeros(N+1,1); % initialization of solutions array
x(1)=x0; % first element of solution array is starting value

for i=2:N+1
    x(i)=x(i-1)+dt*f(x(i-1),a); % explicit euler
end

end

