Simultaneous solving of the system of ordinary differential equations

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.

 Respuesta aceptada

James Tursa
James Tursa el 19 de Mzo. de 2018
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 comentarios

Sepanta Gharib
Sepanta Gharib el 19 de Mzo. de 2018
Editada: Sepanta Gharib el 19 de Mzo. de 2018
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 el 19 de Mzo. de 2018
Editada: James Tursa el 19 de Mzo. de 2018
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?

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 19 de Mzo. de 2018

Abierta de nuevo:

el 22 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by