Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

output middle variable in ode45 to the main function

1 visualización (últimos 30 días)
jin wang
jin wang el 4 de Dic. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Here are the problems I encountered:
1. ode45 can only relate one variable to time t, in this case it's T(including Tcr Tmu Tfat Tvsk Tsk Tbl)
2. BF, CO and HR are used to be sub-sub-sub function of obtaining the coupled differential equations,
For example,
in my main function, [t,T] = ode45(@(t,T) Tcoupled(H,T,MuVO2,VO2,Mtot), tspan, T0);
in Tcoupled function: coupled = [tcr; tmu; tfat; tvsk; tsk; tbl;] will be returned as the 6 differential equations' matrix take tbl as an example: it's one of the differential equations returned from function HBSL in hsbl = feval(@HSBL,T,Mtot,MuVO2,VO2);
in HSBL function: BF=feval(@getBF,VO2,T,MuVO2); (have to mention CO and HR are in subfunction of BF)
Now, I have successfully moved BF,CO and into the subfunction Tcoupled , however, the purpose of Tcouple function is just return the differential equations into the input of ode45. BF,CO and HR have to be inside so that their value change over time. But in this case, i don't know how to output them to the main function.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by