# fir_fs

Version:

Uses frequency sampling to design a linear phase FIR filter. fir_fs windows the impulse response with a Hamming window.

## Syntax

b = fir_fs(n, f, a)
b = fir_fs(n, f, a, w)
Legacy name: fir2

## n

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, MathScript increases n by 1.

## f

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

Magnitudes at each of the f frequencies. a is a real vector. length(a) must equal length(f).

## w

Symmetric window to apply to the impulse response. w is a real vector of length n + 1.

## b

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 = fir_fs(N, F, A)

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices