Kaiser window FIR filter

Hd = firkaiser(Frequencies,Rs,Type,DFormat)

Designs an FIR filter based on the Kaiser window method.

The method automatically determines the required filter order (499 (professional) and up to 128 (educational) edition) and returns coefficients in Hd.

Frequencies: lowpass and highpass are specified via one cut-off frequency, whereas bandpass, bandstop and hilbert filters require two frequencies (i.e. lower and upper cut-off). All frequencies must be ascending in order and < Nyquist (see the example below).

Type: The firkaiser method facilitates the design of lowpass, highpass, bandpass, bandstop, hilbert3 (Type 3 Hilbert), hilbert4 (Type 4 Hilbert), integrator3, integrator4, differentiator3 and differentiator4 filters respectively.

Hd: the firkaiser method designs an FIR window filter based on the entered specifications and places the transfer function (i.e. numerator and gain) into a digital filter object, Hd. The digital filter object can then be combined with other methods if so required. For a digital filter object, Hd, calling getnum(Hd) and getgain(Hd) will extract the numerator and gain coefficients respectively – see below.

DFormat: allows you to specify the display format of resulting digital filter object.

symbolic Display a symbolic representation of the filter object. If the order > 10, the symbolic display option will be overridden and set to numeric.
numeric Display a matrix representation of the filter object
void Create a filter object, but do not display output


ClearH1;  // clear primary filter from cascade

interface F = {10,80,2,40}; // frequency spec (2 bands for bandstop)
interface TW ={10,40,2,20}; // Band transition width 


Freq={F,F+TW,100+TW,125+TW};   // frequency specification