How to solve delay differential equations with computed history (not constant)

4 ビュー (過去 30 日間)
pedro
pedro 2023 年 6 月 19 日
コメント済み: pedro 2023 年 6 月 19 日
Greetings!
I'm trying to solve some delay differential equations. The classic example, the Lotka-Volterra predation model illustrates the problem. This is solved in many places around the web*, always using a constant history (as far as I can tell). Usually, the ode system is solved for comparison, then the delayed system, using a constant history, like the last computed point of the ode system. I'd like to use that computed (approximated by, say, ode45, not analytical) solution of the non-delayed system as history, but can't figure out how. Help would be much appreciated.
* e.g., https://www.mathworks.com/matlabcentral/fileexchange/3899-tutorial-on-solving-ddes-with-dde23

採用された回答

Torsten
Torsten 2023 年 6 月 19 日
移動済み: Torsten 2023 年 6 月 19 日
Save the results of the non-delayed ode in arrays T and Y, create an interpolation function
fun_history = @(t) interp1(T,Y,t)
pass this function to the history function of the delay ode solver (e.g. dde23) and evaluate it at the given time instants passed to the history function.
  1 件のコメント
pedro
pedro 2023 年 6 月 19 日
Torsten,
Thank you very much for your assistance. I had to massage your history function a bit, but in the end it worked. Thanks again, for giving me a push in the right direction!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by