Matlab returns empty symbol when solving laplace transform
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a laplace equation defined in matlab that I believe to be correct. It is defined as eqnLT
% R1, R2, C1, C2 are positive symbols
% i(t) is a symbolic function
% i(0) is set to be 0
eqn(t) =
0 == R1*i(t) + R2*i(t) + diff(i(t), t)/10 + int(i(t), t)/C1 + int(i(t), t)/C2
eqnLT = laplace(eqn, t, s) =
0 == (s*laplace(i(t), t, s))/10 - i(0)/10 + laplace(int(i(t), t), t, s)/C1 + laplace(int(i(t), t), t, s)/C2 + R1*laplace(i(t), t, s) + R2*laplace(i(t), t, s)
I want to solve for `laplace(i(t), t, s)` let it be called `I(s)`. Following the instructions I can find in the matlab documentation, I do the following:
subs(eqnLT, laplace(i(t),t,s),I(s)));
solve(eqnLT, I(s))
The answer I get is empty sym. I am not sure what I am doing wrong.
0 commentaires
Réponses (1)
Star Strider
le 24 Oct 2020
Try this:
syms s t C1 C2 R1 R2 i(t) I(s)
eqn(t) = 0 == R1*i(t) + R2*i(t) + diff(i(t), t)/10 + int(i(t), t)/C1 + int(i(t), t)/C2
eqnLT = laplace(eqn, t, s)
eqnLT = 0 == (s*laplace(i(t), t, s))/10 - i(0)/10 + laplace(int(i(t), t), t, s)/C1 + laplace(int(i(t), t), t, s)/C2 + R1*laplace(i(t), t, s) + R2*laplace(i(t), t, s)
eqnLT = subs(eqnLT, {laplace(i(t), t, s), laplace(int(i(t), t), t, s)}, {I(s), I(s)/s})
isoI = simplify(isolate(eqnLT,I), 'Steps',500)
Experiment with it to get the result you want (works in R2020b, Update 1).
2 commentaires
Star Strider
le 26 Oct 2020
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Voir également
Catégories
En savoir plus sur Number Theory dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!