clear all
clc
disp('Starting...............')

x0 = 0;
y0 = 0;
h = 0.05;
T = 0.1;
disp(' ')


while x0<T
    x1 = x0 + h;
    k1 = x0 - y0;
    k2 = (x0 + h) - (y0 + h*k1);
    k3 = (x0 + 0.5*h) - (y0 + 0.5*h*(k1+k2)*0.5);
    y1 = y0 + (k1 + k2 + 4*k3)/6*h;
    % Move forward
    x0 = x1;
    y0 = y1;
end

disp(['Solution at x =' num2str(x0) '  is  y(' num2str(x0) ') = '  num2str(y0)])