I have designed a Butterworth highpass filter (HPF) of 4th order with cutoff frequency high enough to give a gain of $3$ at high frequencies. I want to find the inverse $z$-transform using MATLAB.

OSR = 16;
[b,a] = butter(L,0.259,'high');
b = b/b(1);
H = tf(b,a,[],'variable','z^-1');

iztrans doesn't seem to support tf or zpk.

  • $\begingroup$ Can you please rephrase this question because the way it is put at the moment is more about doing things in MATLAB and less about DSP. In the meantime, if you were aware of the z-transform's poles and zero locations, how would you go about finding the inverse? $\endgroup$
    – A_A
    Jan 5 '17 at 15:04

The function iztrans only supports symbolic expressions. This should do the trick:

[num,den] = tfdata(H); syms z H_sym = poly2sym(cell2mat(num),z)/poly2sym(cell2mat(den),z); h_inv = iztrans(H_sym);

  • $\begingroup$ the code seems ok , but then can u tell me what actually is being done here and when i open h_inv in workspace , i don't see any data in it,why? $\endgroup$ Jan 5 '17 at 6:30
  • $\begingroup$ First, you store in two different variables (num and den) the coefficientes of the numerator and the denominator, respectively, of your transfer function. Then, using the function poly2sym you use those coefficientes to create a symbolic polynomial with the previously declared symbolic variable z. So now you are all set to pass this function to iztrans, which only accepts symbolic expressions as inputs. Don't use the Workspace to see h_inv, just write h_inv and press Enter in the commandline and you'll see the result (or use MuPAD for a more friendly visualization). $\endgroup$
    – Tendero
    Jan 5 '17 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.