firls: Least-squares linear-phase 'FIR' filter design

View source: R/filter-fir.R

firlsR Documentation

Least-squares linear-phase FIR filter design

Description

Produce a linear phase filter from the weighted mean squared such that error in the specified bands is minimized.

Usage

firls(N, freq, A, W = NULL, ftype = "")

Arguments

N

filter order, must be even (if odd, then will be increased by one)

freq

vector of frequency points in the range from 0 to 1, where 1 corresponds to the Nyquist frequency.

A

vector of the same length as freq containing the desired amplitude at each of the points specified in freq.

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 freq.

ftype

transformer type; default is ""; alternatively, 'h' or 'hilbert' for 'Hilbert' transformer.

Value

The FIR filter coefficients with class 'Arma'. The moving average coefficient is a vector of length n+1.


ravetools documentation built on Sept. 11, 2024, 9:06 p.m.