How to use a time variable factor inside a ODE function?
Afficher commentaires plus anciens
Dear all,
I am trying to solve three coupled differential equations which are dependent on a time variable factor ka(absorpion rate). The code is as shown below:
function Estate = ode(t,x); ka = [122e+5;0;0;0;0;0;0;0;0;0;0;122e+5]; % time variable absorption rate kf = 2.875e+8*0.65; ki = 0.5e+6; kt= 0.38e+6;
G = x(1); E = x(2); T = x(3);
Gdot = -ka*G + kf*E + kt*T; Edot = ka*G - (ki+kf)*E; Tdot = ki*E - kt*T;
Estate = [Gdot;Edot;Tdot];
At t = 0, ka = 122e+5 and so on, How can I define my time variable factor "ka" to solve the equations?
Thank you.
Best regards, Imaad.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!