Simultaneous solving of the system of ordinary differential equations

14 ビュー (過去 30 日間)
Sepanta Gharib
Sepanta Gharib 2018 年 3 月 19 日
再開済み: Walter Roberson 2018 年 12 月 22 日
Dear friends
I have two sets of ODE system (A & C) that need to be solved simultaneously. For example, the system A is the original ODE system, in which there is a variable B that must be calculated from the ODE system C. How should this problem be coded?
Thank you for your cooperation.

採用された回答

James Tursa
James Tursa 2018 年 3 月 19 日
The doc for ode45 shows examples of 2nd order ODE systems. E.g., look at this link
and then scroll down to the "van der Pol" equation example. That has two variables, y1 and y2. Follow that example for your multiple variable problem. If you have problems setting things up, post the code you tried and we can help you fix it up.
  2 件のコメント
Sepanta Gharib
Sepanta Gharib 2018 年 3 月 19 日
編集済み: Sepanta Gharib 2018 年 3 月 19 日
Thank you James
I do not have a one ODE system (of any order), but I have two completely separate 1st ODE systems which should be solved simultaneously. Please refer to the attached files. The "CatReformer1_End" function is the original ODE system that has a variable "Texo" that must be derived from the "CatReformer1_Exo" ODE system and this system also has a variable "Tend" that must be derived from the "CatReformer1_End" ODE system. This should be done at the same time and separately. I used the global order, but this will make a mistake.
James Tursa
James Tursa 2018 年 3 月 19 日
編集済み: James Tursa 2018 年 3 月 19 日
It is not clear to me from looking at your files how the two state vectors y for these systems are related. In one case you have a 7-element y vector and in the other case you have an 8-element y vector, and the Texo and Tend values are apparently just elements from these y vectors. Are these two y vectors related in some way? What is the definition of these state vectors for these two systems?

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

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