MATLAB: How to give ode45 just 1 time step

differential equationsMATLABode45structures

If I give only one step by tspan = 0:0.01:0.01; then it takes many smaller steps automatically between 0 and 0.01 How can I force it to take just one step?

Best Answer

ODE45 is an integrator with a step size control, which adjust the steps to satisfy the demands for accuracy. This helps to find the optimum between rounding and discretization errors. In consequence you can and should not force the integrator to use a specific step size.
Use a fixed step size integrator if you have any good reason to do so, but not ODE45.
Related Question