By setting a tspan=[to:very_small_step:tf], can it affect ode45 solver's step size?

StackOverflow https://stackoverflow.com/questions/12306893

  •  30-06-2021
  •  | 
  •  

Question

I have know that the ode45 solver has adaptive step size controlled by Matlab program itself. The description below is given by Matlab website:

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.

However, if I specify very_small_step in tspan=[to:very_small_step:tf], will this affect program controlled step size. Will this force step size less than the value of very_small_step? OR matlab will make interpolation calculation to get the corresponding result at specified time point?

Was it helpful?

Solution

From your quote

Specifying tspan with more than two elements does not affect the internal time steps

Also there exists the MaxStep property to configure the maximum step size. For steps in between the solvers use continuous extension formulas as described here.

Why are you asking anyway? What problem do you encounter?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top