using dsolve to equation

조회 수: 12 (최근 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 CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by