clear, clf, hold off
t=0;
n=0;
v=0;
C=0.27;
M=70;
g=9.81;
h=0.1;
t_rec(1)=t;
v_rec(1)=v;
while t<=20
    n=n+1
    v=v+h*(-C/M*v*v + g);
    t=t+h
    v_rec(n+1)=v;
    t_rec(n+1)=t;
end
plot (t_rec,v_rec)
xlabel('time (s)')
ylabel('velocity (m/s)')