iirnotch (Digital Filter Design Toolkit, MathScript Function)

Digital Filter Design MathScript Functions

iirnotch (Digital Filter Design Toolkit, MathScript Function)

Owning Class: singlerate

Syntax

[b, a] = iirnotch(w, bw)

[b, a] = iirnotch(w, bw, ab)

Description

Designs a second-order, infinite impulse response (IIR) notch filter.

Examples

Inputs

Name Description
w Specifies the center frequency of the filter notch. w is a double-precision, floating-point number that must fall in the range (0, 1).
bw Specifies the bandwidth of the filter notch 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] = iirnotch(0.1, 0.001);fft_mag = abs(fft(b, 16384)./fft(a, 16384));
figure;
plot(0:1/8192:1, fft_mag(1:8193));

Related Topics

iircomb
iirpeak