フィルターのクリア

How to solve an ODE with three equation that are dependent on each other

1 回表示 (過去 30 日間)
Pipe
Pipe 2022 年 10 月 19 日
編集済み: Torsten 2022 年 10 月 19 日
I have these equations that are supposed to tell me how the concentration of C changes over time. I am trying to use ODE 45 but I keep getting error
v1=0.3;
k2 = 0.3; %constant
C = v1-dpdt; %ODE for network
dpdt = k2*C; %Rate of equation
for tspan = 0:100
dpdt = @(PEP,t) (k2*C*t)
[PEP, t] = ode45(dpdt,tspan,0)
end
  1 件のコメント
Torsten
Torsten 2022 年 10 月 19 日
編集済み: Torsten 2022 年 10 月 19 日
Please write down the differential equation(s) you are trying to solve in a mathematical notation since your code doesn't make sense.

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2022 年 10 月 19 日
Some of this is difficult to interpret.
My best guess at a solution —
v1=0.3;
k2 = 0.3; %constant
C = v1;
% C = v1-dpdt; %ODE for network
% dpdt = k2*C; %Rate of equation
tspan = 0:100;
dpdt = @(PEP,t) (k2*C*t);
[t,PEP] = ode45(dpdt,tspan,k2);
figure
plot(t,PEP)
grid
xlabel('t')
ylabel('PEP')
Make appropriate changes in case my guess is in error.
.

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by