MATLAB: Creating discrete-time model

#z-domain #discrete #discretemodel

Hello, can someone please tell me what am I doing wrong in writing this expression in MATLAB:
This is the result I'm obtaining: H =
8 z^5 - 5 z^4 - 4 z^3 + z^2 + 3 z - 2
----------------------------------------------------------------------
0.0648 z^6 + 0.1134 z^5 - 0.6184 z^4 + 1.436 z^3 - 1.7 z^2 + 1.6 z - 1
And here is my code:
Nd=[-8 5 4 -1 -3 2];
Dd=[-0.0648 -0.1134 0.6184 -1.436 1.7 -1.6 1 ];
P=Nd;Q=Dd;
H = tf(P,Q,0.1)

Best Answer

Use this line of code to get a negative exponent.
H = tf(P,Q,0.1,'variable','z^-1');