Error plotting inverse laplace in time domain
Show older comments
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?
Answers (1)
bym
on 27 Nov 2011
perhaps try
plot(0:10,subs(a,0:10));
2 Comments
R J
on 27 Nov 2011
bym
on 27 Nov 2011
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
Categories
Find more on Special Values in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!