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.

 採用された回答

Torsten
Torsten 2016 年 6 月 6 日

0 投票

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

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by