iirpeak (Digital Filter Design Toolkit, MathScript Function)
Owning Class: singlerate
Syntax
[b, a] = iirpeak(w, bw)
[b, a] = iirpeak(w, bw, ab)
Description
Designs a second-order, infinite impulse response (IIR) peak filter.
Inputs
Name | Description |
w | Specifies the center frequency of the filter peak. w is a double-precision, floating-point number that must fall in the range (0, 1). |
bw | Specifies the bandwidth of the filter peak at -ab dB. bw is a double-precision, floating-point number that must fall in the range (0, 1). |
ab | Specifies the attenuation, in decibels, that corresponds to the bandwidth bw. ab is a double-precision, floating-point number greater than zero. The default is 3.0103, which corresponds to a 3 dB bandwidth, a commonly used bandwidth for a filter. |
Outputs
Name | Description |
b | Returns the numerator of the designed IIR filter. b is a three-element real vector. |
a | Returns the denominator of the designed IIR filter. a is a three-element real vector. |
Examples
[b, a] = iirpeak(0.1, 0.001);fft_mag = abs(fft(b, 16384)./fft(a, 16384));
figure;
plot(0:1/8192:1, fft_mag(1:8193));