%% ENM 7.3
clear all
g = 9.81;
t_end = 1;
a = 1.1;
v_0 = 50;

h = 0.05;
n_steps = 1/h;
% figure
for i = 1:3
   t = 0;
   t_V = t;
   v_V = v_0;
   v = v_0;

   for n = 1:n_steps
       v = v+h * g*(1-(v/5).^a);
       t = t + h;
       t_V = [t_V;t];
       v_V = [v_V;v];
   end
   disp(['Sluthastighet:' num2str(v_V(end))])
   n_steps = n_steps*2;
   h = h/2;
   plot(t_V,v_V)
   hold on
end
