Using Matlab ODE integrators with the method of lines
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Torsten
2016 年 7 月 18 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!