The odeset looks fine for setting the tolerances.
Your code should not be using any formula for terminal velocity given forces, and it should certainly not be integrating that formula. (Notice the formula does not even involve t or x.)
Instead, your code should be using an expression for dV -- given the current time and boundary conditions, how would you calculate the change in velocity ? Downward force due to gravity minus upward force due to friction based upon the current velocity. Now run that ode getting out time and velocity. The terminal velocity is the last output velocity from the ode. Now locate the position inside the velocity vector where the velocity vector first reaches at least 99% of that final velocity, and use that location to index the time vector.
Since you are asked to get out velocity and position, the implication is that you need to be using an ode with two parameters, with formulas for dP and dV and getting out P and V.
Best Answer