is it possible to change step size of "ode45" ?

101 visualizaciones (últimos 30 días)
ADNAN KIRAL
ADNAN KIRAL el 22 de Nov. de 2018
Comentada: Jan el 22 de Nov. de 2018
hi
I was wondering can I change step size of "ode45"? If I am not wrong, the default step size taken by Matlab is 1. I want to make 1/2. how can I change without changing many things in Matlab code. If I assign an "option", is that enough? any other options?
thanks
  1 comentario
Jan
Jan el 22 de Nov. de 2018
No, the default step size of ODE45 is not 1. There is not even a default step size. See Torsten's answer: The step size is controlled such, that the provided tolerances are kept.
With using a vector as tspan, you can define the steps in the output, but this is not the internally used step size.

Iniciar sesión para comentar.

Respuesta aceptada

Torsten
Torsten el 22 de Nov. de 2018
Editada: Torsten el 22 de Nov. de 2018
The stepsize of ode45 is not constant, but chosen such that the error tolerances you prescribe are met. Thus mean step size can only be controlled indirectly by strengthening (-> smaller stepsize) or weakening (-> larger stepsize) the error tolerances RelTol and AbsTol.
Or do you mean changing the time instants when MATLAB supplies the solution ?

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by