|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
LeastSquaresFilterKernel
LeastSquaresFilterKernel[{{
1, ...,
k-1}, {a1, ..., ak}}, n]
creates a k-band finite impulse response (FIR) filter kernel of length n designed using a least squares method, given the specified frequencies
and amplitudes
.
LeastSquaresFilterKernel[{"type", spec}, n]
uses the full filter specification
.
Details and OptionsDetails and Options
- LeastSquaresFilterKernel returns a numeric list of length n of the impulse response coefficients of an FIR filter that has the minimum mean-squared error.
- The impulse response of the filter is computed using the inverse discrete-time Fourier transform.
- In LeastSquaresFilterKernel[{"type", spec}, n], filter specification can be any of the following:
-
{"Lowpass",
c}lowpass filter with cutoff frequency 
{"Highpass",
c}highpass filter with cutoff frequency 
{"Bandpass",{
c1,
c2}}bandpass filter with pass band from
to 
{"Bandstop",{
c1,
c2}}bandstop filter with stop band from
to 
{"Multiband",{
1,...,
k-1},{a1,...,ak}}multiband filter specification with k bands {"Differentiator",
c}differentiator filter with cutoff frequency 
{"Hilbert",
c}Hilbert filter with cutoff frequency 
- If
is omitted,
is assumed. - Frequencies should be given in an ascending order such that
. - Amplitude value
corresponds to the frequency band
to
, and amplitude
corresponds to the frequency band
to
. - Amplitude values should be non-negative. Typically, values
specify a stopband, and values
specify a passband. - The kernel, ker, returned by LeastSquaresFilterKernel can be used in ListConvolve[ker, data] to apply the filter to data.
- LeastSquaresFilterKernel takes a WorkingPrecision option, which specifies the precision to use in internal computations. The default setting is WorkingPrecision->MachinePrecision.
New in 9
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »





