Matlab returns empty symbol when solving laplace transform
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Star Strider
el 24 de Oct. de 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 comentarios
Star Strider
el 26 de Oct. de 2020
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!