plot inverse z transform
9 次查看(过去 30 天)
显示 更早的评论
I want to plot the sequence described by the inverse transform of the following Pulse Transfer Function
G(z) = (0.6321*z^-1)/(1-1.3679*z^-1+0.3679*z^-2)
writing the code
syms z k
G = (0.6321*z^-1)/(1-1.3679*z^-1+0.3679*z^-2)
g = iztrans(G, z, k)
k = linspace(0,14,15);
stem(g,k)
or even
syms z k
G = (0.6321*z^-1)/(1-1.3679*z^-1+0.3679*z^-2)
g = iztrans(G, z, k)
stem(g)
But there is the following error:
DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use VPA.
Error in
stem(g)
What is the problem?
0 个评论
回答(2 个)
Walter Roberson
2016-5-1
stem() does not understand symbolic expressions. You need to evaluate to get numeric expressions.
gn = double( subs(g, sym('k'), k) );
stem(gn, k)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!