%Explicit Euler's
function [ baller, er, matx, maty ] = euler_explicit(func, dfunc, y0, t0, tf, h)

%Init time step
t = t0;

%Init y value
y = y0;

%Calc steps
N = (tf-t0)/h;

%Loop for euler's method
for j = 1:N
    
    %Euler's method function at y (EXPLICIT)
    y = y + dfunc(t,y)*h;

    %Calc error at this y
    er = abs(((func(t) - y)/func(t))*100);

    %Next time step
    t = t + h;
    
    matx(j) = t;
    maty(j) = y;
end

%Outputs value
baller = y;

