How to solve equations symbolically and limit the equations?

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Walter Roberson
Walter Roberson il 27 Feb 2019
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

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by