Member of the filter design class.
b = fir2(n, f, a)
b = fir2(n, f, a, w)
Uses frequency sampling to design a linear phase FIR filter. fir2 windows the impulse response with a Hamming window.
| 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. |
| f | Specifies the frequencies at which you want to take samples. 1 represents the Nyquist frequency. f is a real vector of ascending values in the interval [0, 1]. length(f) must equal length(a). |
| a | Specifies the magnitudes at each of the f frequencies. a is a real vector. length(a) must equal length(f). |
| w | Specifies the symmetric window to apply to the impulse response. w is a real vector of length n + 1. |
| Name | Description |
| b | Returns the filter coefficients of order n. b is a real vector. |
N = 13;
F = [0, 0.1, 0.5, 0.7, 1];
A = [0, 1, 1, 0, 0];
B = fir2(N, F, A)