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));
类别
在 帮助中心 和 File Exchange 中查找有关 Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!