Based on the documentation for the ode functions, you should be able to do what you have indicated in the commented-out line:
tspan = to:0.01:tf; %# Obtain solutions at specific times
[T,Y] = ode45(name,tspan,init,options);
EDIT:
With respect to the accuracy of solutions when fixed step sizes are used, refer to this excerpt from the above link:
Specifying tspan
with more than two
elements does not affect the internal
time steps that the solver uses to
traverse the interval from tspan(1)
to
tspan(end)
. All solvers in the ODE
suite obtain output values by means of
continuous extensions of the basic
formulas. Although a solver does not
necessarily step precisely to a time
point specified in tspan
, the
solutions produced at the specified
time points are of the same order of
accuracy as the solutions computed at
the internal time points.
So, even when you specify that you want the solution at specific time points, the solvers are still internally taking a number of adaptive steps between the time points that you indicate, coming close to the values at those fixed time points.