i have made the matlab source code to solve a differential equation. But when it is run, an error occurs on line 16. I don't know where the error is specifically located. If a

1 回表示 (過去 30 日間)
function dydt= KIB(t,y)
% Parameter
a=(4.31)*10^(-1);b=(1.02)*10^(-9);c=(2.9077)*10^(-13);
d=(4.5)*10^(-8);Kt=(9)*10^(-1);delta=1.8328;
e=(1.29)*10^(-3);f=(4)*10^(-1);g=(2.08)*10^(-7);
p=(2.794)*10^(-13);pn=(6.68)*10^(-2);gn=(2.5036)*10^(5);
Kn=(6.75)*10^(-2);teta=(2.5036)*10^(-3);m=(9)*10^(-3);
j=(1.245)*10^(-2);k=(2.5036)*10^(7);q=(3.422)*10^(-10);
r1=(2.9077)*10^(-11);r2=(5.8467)*10^(-13);u=(4.417)*10^(-14);
kappa=(2.5036)*10^(3);Kl=(4.86)*10^(-2);Pi=2.971;
gi=(2.5036)*10^(3);alpha=(7.50)*10^(8);beta=(6.3)*10^(-3);
Kc=(3.4)*10^(-2);gamma=(5.199)*10^(-1);miu=11.7427;
phi=(2.38405);
% Sistem Persamaan
syms T(t) N(t) L(t) C(t) M(t) I(t)
ode1=diff(T)==(a*y(1)*(1-b*y(1)))-(c*y(2)*y(1))-(d*y(3)*y(1))-(Kt(1-e^(delta*y(5)))*y(1));
ode2=diff(N)==(g*y(4))-(f*y(2))-(p*y(2)*y(1))+((pn*y(2)*y(6))/(gn+y(6)))-(Kn(1-e^(delta*y(5)))*y(2));
ode3=diff(L)==((-(teta*m*y(3))/(teta+y(6)))+((j*y(1)*y(3))/(k+y(1)))-(q*y(3)*y(1))+((r1*y(2)+r2*y(4))*y(1))-((u*y(3)^2*y(4)*y(6))/(k+y(6)))-(Kl(1-e^(delta*y(5)))*y(3))+((pi*y(3)*y(6))/(gi+y(6)))+(Vl));
ode4=diff(C)==(alpha)-(beta*y(4))-(Kc*(1-e^(delta*y(5)))*y(4));
ode5=diff(M)==(-gamma*y(5))+(Vm);
ode6=diff(I)==(-miu+phi*y(4))+(Vi);
odes=[ode1; ode2; ode3; ode4; ode5; ode6]
S = dsolves(odes)
TSol(t) = S.T
NSol(t) = S.N
LSol(t) = S.L
CSol(t) = S.C
MSOl(t) = S.M
ISol(t) = S.I
[TSol(t),NSOl(t),LSol(t),Csol(t),MSol(t),ISol(t)] = dsolves(odes)
end
  2 件のコメント
Steven Lord
Steven Lord 2021 年 10 月 24 日
What is the full and exact text (everything displayed in red and/or orange in the Command Window) of the error and/or warning messages you receive when you run your code? The exact text of the messages may include information that will help us determine the problem or at least the next step to take in investigating the problem.
Abd Mukit
Abd Mukit 2021 年 10 月 25 日
Not enough input arguments.
Error in KIB (line 16)
ode1 = diff(T) == (a*y(1)*(1-b*y(1)))-(c*y(2)*y(1))-(d*y(3)*y(1))-(Kt(1-e^(delta*y(5)))*y(1));

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by