function [euestimate, realval, error] = euler_explicit(f, df, y0, t0, tf, h)

format long;

N = abs((t0 + tf)/h);

baller = zeros(N, 3);

t = t0;

baller(1, 1) = y0;

baller(1, 2) = f(t0, y0);


for j=2:N+1
    
    if j == 2
        temp = baller(1, 1);
    else 
        temp = baller(j - 1, 1);
    end
      
    baller(j, 1) = temp + h*(df(t, temp));
    
    t = t + h;  
    
end

base = 0;

for j=1:N+1
    
    baller(j, 2) = f(base, j);
    
    baller(j, 3) = abs(((f(base, j) - baller(j, 1))/(f(base, j))) * 100);
   
    base = base + h;      
end

%baller

euestimate = baller(N+1, 1);
realval = baller(N+1, 2);
error = baller(N+1, 3);

hold all;

for j = 1:N + 1;
    plot(j,baller(j,1),'sr');
    plot(j,baller(j,2),'sb');
end

legend('Explicit Euler','Actual Value');