I have the difference equation
y(k) == (4*y(k - 1))/5 + (2*u(k))/5
and would like to get the transfer function
0.4*z Gz(z)= ------- z-0.8
There are two issues. If I use vpa() to get
y(k) == 0.8*y(k - 1) + 0.4*u(k)
ztrans throws this error:
Error using symengineThe 'List' option is not allowed for input of this type.Error in transform (line 74)F = mupadmex('symobj::vectorizeSpecfunc', f.s, x.s, w.s, trans_func,'infinity');Error in sym/ztrans (line 28)F = transform('ztrans', 'n', 'z', 'w', f, varargin{:});Error in drt (line 31)sys = ztrans(discrete_eqn,k,z)
but even if I don't use vpa(), ztrans(eqn,k,z) just gives the following output:
ztrans(y(k) == (4*y(k - 1))/5 + (2*u(k))/5, k, z)
Why doesn't it replace y(k-1) with 1/z*ztrans(y(k)) etc?
Best Answer