I need help solving RC circuit using Leplace inverse, then graph the output which is in the symsum form
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Star Strider
2021년 11월 23일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!