Member of the filter design class.
b = fir1(n, w)
b = fir1(n, w, option)
b = fir1(n, [w1, w2], window)
b = fir1(n, [w1, w2], option, window)
Uses the window design method to design a linear phase FIR filter. This function windows the impulse response with a Hamming window by default.
| Name | Description | ||||||||||||
| n | Specifies the filter order. n is a nonnegative integer. n must be even for filters with a non-zero gain at the Nyquist frequency. If n does not meet this condition, LabVIEW increases n by 1. | ||||||||||||
| w | Specifies the cutoff frequency of the filter. w is real number between 0 and 1. 1 represents the Nyquist frequency. | ||||||||||||
| w1 | Specifies the low cutoff frequency. w1 must fall in the range [0, 1]. | ||||||||||||
| w2 | Specifies the high cutoff frequency. w2 must fall in the range [0, 1] and must be greater than w1. | ||||||||||||
| option | Specifies the type of filter to design. option is a string that accepts the following values.
|
||||||||||||
| window | Specifies the window coefficients. The length of window must equal n + 1. If n is even and the filter has a non-zero gain at the Nyquist frequency, the length of window must equal n + 2. |
| Name | Description |
| b | Returns the filter coefficients of order n. b is a real vector. |
N = 5;
W = 0.2;
B = fir1(N, W, 'low', hanning(6))