B = 8.896;      %Buoyancy force in Newtons
K = 28.074;     % Cd * SWDensity * Area in meters^2
M = 25.592;     %Mass in kg
dT = 0.1;           % time step in seconds

vel(1) = 0;
acc(1) = (B - K * (vel(1)^2)/2) / M;
time(1) = 0;

for i=2:300
    time(i) = time(i-1) + dT;
    vel(i) = vel(i-1) + acc(i-1) * dT;
    acc(i) = (B - K * (vel(i)^2)/2) / M;
end
    
plot(time,vel,time,acc)

Tprofile = 500 / vel(end);
