Now it runs!
To plot all the velocity values you have to code in this way (I underline the lines that I have added):
figure();
while t<TO && Alt>1000
if V>-Vt_before
a=(1/2)*(pair/m)*(V^2)*Ab*Cdb-g;
V=Vi+a*TS;
Alt=Alt+V*TS+(1/2)*a*TS^2
Vi=V;
t=t+TS
time=t;
disp('The skydiver did not reach terminal velocity.')
else Vterm=1;
Alt=-Vt_before*TS+Alt
t=t+TS
disp('The skydiver reached terminal velocity.')
end
plot(t,V,'.');hold on
end