MATLAB: How to extract coefficient of difference equation in Matlab

differential equations

I have a difference equation below:
Y(t) = 6*x*(t)+4*x*(t-1)-6*x*(t-3)+2*Y*(t-1)
How to extract coefficient of difference equation

Best Answer

To extract coefficient of difference equation, a possible workaround would be as follows -
  • Convert difference equation into a f(z) using Z transforms. Documentation available here
  • Extract thne coefficients of f(z) using sym2poly. Solution can be found here