firls: Least-squares linear-phase FIR filter design
Description
Produce a linear phase filter such that the integral of the weighted mean
squared error in the specified bands is minimized.
Usage
firls(n, f, a, w = rep(1L, length(a)/2))
Arguments
n
filter order (1 less than the length of the filter). Must be even.
If odd, it is incremented by one.
f
vector of frequency points in the range from 0 to 1, where 1
corresponds to the Nyquist frequency. Each band is specified by two
frequencies, so the vector must have an even length. .
a
vector of the same length as f containing the desired
amplitude at each of the points specified in f.
w
weighting function that contains one value for each band that
weights the mean squared error in that band. w must be half the
length of f.
Value
The FIR filter coefficients, a vector of length n + 1, of
class Ma.
Details
The least squares optimization algorithm for computing FIR filter
coefficients is derived in detail in [1].