Using Matlab ODE integrators with the method of lines
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
This is a question about the syntax of Matlab. The context is that I am trying to use one of the ODE integrators (say ode45) to propagate a vector in time, the vector being the values of some function on a grid (I think this is called the method of lines). Oftentimes one would want to apply some correction (say filter out noise) when certain criteria are obeyed (say every fixed number of time steps). Is there an option in one of the integrators to call an auxiliary function to act on the solution? The closest I got is what is called "output function" but that seems to be a way to get information out of the code periodically, not to modify the solution itself.
0 Kommentare
Antworten (1)
Torsten
am 18 Jul. 2016
Call the ODE-integrator for a small time step, modify the solution and use the modified solution as initial value for the next step, call the ODE-integrator for a second small time step, modify the solution ...
Use a loop to implement the above strategy.
Best wishes
Torsten.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!