Navigation

Operators and Keywords

Function List:

C++ API

Function File: [b, a] = butter (n, Wc)

Function File: [b, a] = butter (n, Wc, "high")

Function File: [b, a] = butter (n, [Wl, Wh])

Function File: [b, a] = butter (n, [Wl, Wh], "stop")

Function File: [z, p, g] = butter (...)

Function File: [a, b, c, d] = butter (...)

Function File: [...] = butter (..., "s")

Generate a butterworth filter. Default is a discrete space (Z) filter.

[b,a] = butter(n, Wc) low pass filter with cutoff pi*Wc radians

[b,a] = butter(n, Wc, 'high') high pass filter with cutoff pi*Wc radians

[b,a] = butter(n, [Wl, Wh]) band pass filter with edges pi*Wl and pi*Wh radians

[b,a] = butter(n, [Wl, Wh], 'stop') band reject filter with edges pi*Wl and pi*Wh radians

[z,p,g] = butter(...) return filter as zero-pole-gain rather than coefficients of the numerator and denominator polynomials.

[...] = butter(...,'s') return a Laplace space filter, W can be larger than 1.

[a,b,c,d] = butter(...) return state-space matrices

References:

Proakis & Manolakis (1992). Digital Signal Processing. New York: Macmillan Publishing Company.

Demonstration 1

The following code

 sf = 800; sf2 = sf/2;
 data=[[1;zeros(sf-1,1)],sinetone(25,sf,1,1),sinetone(50,sf,1,1),sinetone(100,sf,1,1)];
 [b,a]=butter ( 1, 50 / sf2 );
 filtered = filter(b,a,data);

 clf
 subplot ( columns ( filtered ), 1, 1)
 plot(filtered(:,1),";Impulse response;")
 subplot ( columns ( filtered ), 1, 2 )
 plot(filtered(:,2),";25Hz response;")
 subplot ( columns ( filtered ), 1, 3 )
 plot(filtered(:,3),";50Hz response;")
 subplot ( columns ( filtered ), 1, 4 )
 plot(filtered(:,4),";100Hz response;")

Produces the following figure

Figure 1

Package: signal