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

回答(1 个)

Walter Roberson
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

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by