magnitude of FIR and IIR filters
[xm,fr]=frmag(sys,npts)
[xm,fr]=frmag(num,den,npts)
: :npts integer, the number of points in frequency response. : :xm vector of magnitude of frequency response at the points fr. : :fr points in the normalized frequency domain where magnitude is
evaluated.
:
calculates the magnitude of the frequency responses of FIR and IIR filters. The filter description can be one or two vectors of coefficients, one or two polynomials, or a single output discrete transfer function.
the frequency discretisation is given by fr=linspace(0,1/2,npts).
hz=`iir`_(3,'bp','cheb1',[.15 .25],[.08 .03]);
[hzm,fr]=frmag(hz,256);
`plot`_(fr,hzm)
hz=`iir`_(3,'bp','ellip',[.15 .25],[.08 .03]);
[hzm,fr]=frmag(hz,256);
`plot`_(fr,hzm,'r')