% Comparison between Euler, RK4 and true solution

[t, yeu] = eulode(@example,[0 4],2,1);
[t, yrk] = rk4ode(@example,[0 4],2,1);
[t, y23] = ode23(@example,[0:1:4],2);
[t, y45] = ode45(@example,[0:1:4],2);

ytrue = solution([0:1:4]);

disp('     t       y_Euler   y_RK4     y_ODE23   y_ODE45   y_true   Eul. RE (%)   RK4 RE(%)  ODE23 RE (%)  ODE45 RE (%)')
disp([t, yeu', yrk', y23, y45, ytrue', (abs(ytrue-yeu)./ytrue*100)', (abs(ytrue-yrk)./ytrue*100)', (abs(ytrue-y23')./ytrue*100)', (abs(ytrue-y45')./ytrue*100)'])
