FIR Filter Design |
bandpass(f1, f2, n, [w]) Returns coefficients for a bandpass FIR filter with n coefficients and cutoff frequencies f1 and f2, windowed with a taper w.
bandstop(f1, f2, n, [w]) Returns coefficients for a bandstop FIR filter with n coefficients and cutoff frequencies f1 and f2, windowed with taper w.
highpass(f, n, [w]) Returns coefficients for a highpass FIR filter with n coefficients and cutoff frequency f, windowed with taper w.
lowpass(f, n, [w]) Returns coefficients for a lowpass FIR filter with n coefficients and cutoff frequency f, windowed with taper w.
setwindow(n) Returns the currently selected window for FIR filter design using the functions lowpass, highpass, bandpass, and bandstop. The argument n sets the window to one of six available windows.
w (optional) is an integer representing a windowing function. A rectangular window is used if w is omitted. The following table shows values for w and the windows they correspond to:
|
Value of w |
Window |
|
1 |
rectangular |
|
2 |
tapered rectangular |
|
3 |
triangular |
|
4 |
Hanning |
|
5 |
Hamming |
|
6 |
Blackman |
|
7 |
Nuttall |