Borrar filtros
Borrar filtros

What timestep does my ode15s solver use?

1 visualización (últimos 30 días)
Mitch Meulensteen
Mitch Meulensteen el 21 de Nov. de 2019
Editada: ME el 21 de Nov. de 2019
Hi,
i'm having the following issue: while using ode15s solver, it seems that during some moments the time step is too big, resulting in a huge spike. See attachment.
Hence I'd like to find out what step sizes are used at that moment, to see if I can prevent these spikes by using MaxStep with a value lower than the currently used one.

Respuestas (1)

ME
ME el 21 de Nov. de 2019
Editada: ME el 21 de Nov. de 2019
Assuming you call ode15s with [t,y]=ode15s... then you can just use
diff(t)
which will show you the difference between each of the time points (aka the time step length). Or
max(diff(t))
will show you the largest time step.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by