I need help solving RC circuit using Leplace inverse, then graph the output which is in the symsum form
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Abdelrhman Abdelfatah
el 23 de Nov. de 2021
Comentada: Star Strider
el 23 de Nov. de 2021
So I solved the following Ciruit using Leplace Transform, as I want to find the output on V3.
and this is what I got
then I used Symbolic Math Toolbox Laplace transforms .. with the following code
Ys2(s)=((2*s^2+7*s+3)/(2*s^3+11*s^2+15*s+4)*(2*s+2)/(2*s^2+7*s+3)*1/(s+1)*1/s)
yt = ilaplace(Ys2,s,t)
and this is the output
1/2 - symsum((exp(t*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k))*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2)/(6*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2 + 22*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k) + 15), k, 1, 3) - (15*symsum(exp(t*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k))/(6*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2 + 22*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k) + 15), k, 1, 3))/2 - (11*symsum((exp(root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)*t)*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k))/(22*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k) + 6*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2 + 15), k, 1, 3))/2
Now I don't understand why I got my code in such a weirdo format? what did I do wrong?
And if nothing is wrong with this code, how to graph it?
I tried using syms, and declaring W and putting it equal to the output, but failed.
Any help is appreciated
0 comentarios
Respuesta aceptada
Star Strider
el 23 de Nov. de 2021
Sometimes a bit fo force (such as using vpa) is necessary —
syms s t
Ys2(s)=((2*s^2+7*s+3)/(2*s^3+11*s^2+15*s+4)*(2*s+2)/(2*s^2+7*s+3)*1/(s+1)*1/s)
yt = ilaplace(Ys2,s,t)
yt = vpa(simplify(yt, 500),5)
ytfcn = matlabFunction(yt)
figure
fplot(ytfcn, [0, 50])
grid on
The matlabFunciton call is not absolutely necessary, however it may make life easier if the intent is to use ‘yt’ outside the Symbolic Math Toolbox.
.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Calculus 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!