<< invfreqs FOSSEE Signal Processing Toolbox invimpinvar >>

FOSSEE Signal Processing Toolbox >> FOSSEE Signal Processing Toolbox > invfreqz

invfreqz

Fit filter B(z)/A(z)to the complex frequency response H at frequency points F. A and B are real polynomial coefficients of order nA and nB.

Calling Sequence

[B,A,C] = invfreqz(H,F,nB,nA,W,iter,tol,trace)
[B,A,C] = invfreqz(H,F,nB,nA,W)
[B,A,C] = invfreqz(H,F,nB,nA)

Parameters

H:

desired complex frequency response.

F:

frequency (must be same length as H).

nB:

order of the numerator polynomial B.

nA:

order of the denominator polynomial A.

W:

vector of weights (must be same length as F).

Description

This is an Octave function. Fit filter B(z)/A(z)to the complex frequency response H at frequency points F. A and B are real polynomial coefficients of order nA and nB. Optionally, the fit-errors can be weighted vs frequency according to the weights W. Note: all the guts are in invfreq.m

Examples

[B,A] = butter(4,1/4);
[H,F] = freqz(B,A);
[Bh,Ah,C] = invfreq(H,F,4,4)
Bh =

0.010209   0.040838   0.061257   0.040838   0.010209

Ah =

1.00000  -1.96843   1.73586  -0.72447   0.12039

C =   -7.7065e-15

Report an issue
<< invfreqs FOSSEE Signal Processing Toolbox invimpinvar >>