How to use a time variable factor inside a ODE function?
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!