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.

 Akzeptierte Antwort

Torsten
Torsten am 6 Jun. 2016

0 Stimmen

Use interp1.
Take a look at the example
"ODE with time-dependent terms" under
Best wishes
Torsten.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by