using dsolve to equation

8 ビュー (過去 30 日間)
Brenda Galabe
Brenda Galabe 2018 年 12 月 12 日
コメント済み: Brenda Galabe 2018 年 12 月 12 日
equation is : d(x1)/dt (t) = -x1(t)*alpha+p
syms x1 t
tank1 = 'diff (x1,t)= - x1* alpha + p'
soln1 = dsolve(tank1,'x1(0) = 0')
it worked at somepoint then i cleared my workspace and then poof stopped. im guessing i had declared something in syms but dont remember ma
error getting
Error using mupadengine/feval (line 163)
Cannot identify differential equations. To solve
algebraic equations, use 'solve' or 'vpasolve'.
Error in dsolve>mupadDsolve (line 336)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 193)
sol = mupadDsolve(args, options);

採用された回答

madhan ravi
madhan ravi 2018 年 12 月 12 日
編集済み: madhan ravi 2018 年 12 月 12 日
Define alpha as symbolic variable , remove strings and before -x1 it should be == and intial condition x(0)==0 without strings around it

その他の回答 (1 件)

Torsten
Torsten 2018 年 12 月 12 日
編集済み: Torsten 2018 年 12 月 12 日
syms x1(t) alpha p
eqn = diff(x1,t) == -x1*alpha+p;
cond = x1(0) == 0;
x1Sol(t) = dsolve(eqn,cond)
  1 件のコメント
Brenda Galabe
Brenda Galabe 2018 年 12 月 12 日
awesome thanks

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

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by