Error plotting inverse laplace in time domain
이전 댓글 표시
Hi
I'm trying to plot a transfer function by first converting it to the time domain. So my laplace function and code is:
syms s
g=((s+5)/(s*(s+3)*(s^2+2*s+6)))
t=0:10; %time domain
a=ilaplace(g) %inverse
plot(t,a(t));
But doing this gives me an error:
??? Error using ==> sym.subsref at 40
Error using ==> maplemex
Error, (in MTM:-subsref) Array index out of range
Error in ==> Untitled4 at 7
plot(t,a(t));
Can someone please tell me what I'm doing wrong?
답변 (1개)
bym
2011년 11월 27일
perhaps try
plot(0:10,subs(a,0:10));
댓글 수: 2
R J
2011년 11월 27일
bym
2011년 11월 27일
I don't have an issue, but I am using Mupad as the symbolic engine
a =
5/18 - (11*(cos(5^(1/2)*t) + (23*5^(1/2)*sin(5^(1/2)*t))/55))/(54*exp(t)) - 2/(27*exp(3*t))
y = subs(a,(0:10))'
y =
0.0000
0.2652
0.3092
0.2646
0.2795
0.2788
0.2771
0.2780
0.2778
0.2777
0.2778
카테고리
도움말 센터 및 File Exchange에서 Special Values에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!