Updated 11 Dec 2019
This document describes a MATLAB script named deorbit_otb that can be used to compute the single optimal impulsive maneuver required to de-orbit a spacecraft in a circular or elliptical Earth orbit. The user provides the classical orbital elements of the initial orbit along with the desired geodetic altitude and relative flight path angle targets at the entry interface (EI).
David Eagle (2020). Optimal Single Impulse De-orbit from Earth Orbits - OTB (https://www.mathworks.com/matlabcentral/fileexchange/73645-optimal-single-impulse-de-orbit-from-earth-orbits-otb), MATLAB Central File Exchange. Retrieved .
Have you considered using Gauss' method or p-Iteration for determining the delta-v? It wouldn't require the optimization toolbox to sweep through TOF for minimizing delta-v, and would give the ending velocity vector without ode45.