Numerical Solution for a System of Three ODEs with Different Constant for Each Time Element

1 回表示 (過去 30 日間)
I have the following equations (which is a system of three ODEs). They should be solved nomerically (for example with 'ode45'). The problem is that Delta in the following equations is not constant and varies during the time. For example, if we consider 64 time elements in the time axis, there is a vector of 64 components for Delta. Each component is constant but they have different vaues. Is it possible to take such a constant (in a vector form) into consideration in 'ode45' or any othe ode solver?
1234.jpg

採用された回答

Stephan
Stephan 2019 年 12 月 5 日
編集済み: Stephan 2019 年 12 月 5 日
  2 件のコメント
Stephan
Stephan 2019 年 12 月 5 日
Yes this is exactly what interp1 does for you. The problem is that the solver uses his own time step, depending on the ode systems properties. If you have a matrix of pairs of time and coefficient values, you supply it to your function to find a value that corresponds with the current time. I think this should work also in your case.
Mehrdad Alinaghian Jouzdani
Mehrdad Alinaghian Jouzdani 2019 年 12 月 5 日
AMAZING. Many thanks. It worked

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

その他の回答 (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