How to solve equations symbolically and limit the equations?
1 次查看(过去 30 天)
显示 更早的评论
I've used the dsolve function to solve a bunch of equations but is there anyway for it to solve in symbolically as I have Lam values and Mu values which I've had to input a numerical value for but is there anyway to keep these in sysmbolic form. Also is there anyway to get an output which limits t to infinty? Thanks Ben
syms P0(t) P1(t)
Lam = 2000
Mu = 1000
eqns = [diff(P0,t) == -Lam*P0+Mu*P1,...
diff(P1,t) == Lam*P0-Mu*P1];
sol = dsolve(eqns, P0(0) == 1, P1(0) == 0)
solP0(t)= sol.P0
solP1(t)= sol.P1
0 个评论
回答(1 个)
Walter Roberson
2019-2-27
Just change your Lam = 2000 and Mu = 1000 to
syms Lam Mu
The results you get in solP0 and solP1 will involve variables Lam and Mu
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!