Replacing Variable in an ODE
Show older comments
syms T(t)
ode = diff(T,t) == (Lemda-(Sigma.*T));
cond = T(0) == To;
Solution = dsolve(ode, cond)
ERRORS; (Not replacing with a variable)
Undefined function or variable 'Lemda'.
Error in Project (line 11)
ode = diff(T,t) == (Lemda-(Sigma.*T));
4 Comments
SALAH ALRABEEI
on 13 Jun 2021
Edited: SALAH ALRABEEI
on 13 Jun 2021
Are Lamda and sigma constants or vaiables!
Walter Roberson
on 13 Jun 2021
It does not matter. dsolve() is for symbolic expressions, so we can create symbolic variables without caring about whether they will later be constants or later will be changed.
Fahad Ramzan
on 13 Jun 2021
SALAH ALRABEEI
on 13 Jun 2021
Thanks Walter.
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
