Program for the design of an IIR Butterworth filter is given below. The function buttord(), is used to find the filter order and center frequency . Function butter() is used to find the filter coefficients.A low pass filter is implemented.** **

**%Program to design an IIR Butterworth filter**

**clear all;**

**close all;**

**fp=input('Enter the pass band frequency fp = ');**

**fs=input('Enter the stop band frequency fs = ');**

**rp=input('Enter the pass band attenuation rp = ');**

**rs=input('Enter the stop band attenuation rs = ');**

**f=input ('Enter the sampling frequency f = ');**

**wp=2*fp/f;**

**ws=2*fs/f;**

**[n,wn]=buttord(wp,ws,rp,rs);**

**[b,a]=butter(n,wn,'low');**

**freqz(b,a,500,f);**

**TITLE ('Magnitude and phase respose of the IIR butterworth filter');**

%output

%Enter the pass band frequency fp = 1000

%Enter the stop band frequency fs = 1200

%Enter the pass band attenuation rp = .2

%Enter the stop band attenuation rs = 45

%Enter the sampling frequency f = 3000

## Wednesday, July 13, 2011

### MATLAB Programs 11: Design of an IIR Butterworth filter

7:13 PM
Anil C S
12 comments

## 12 comments:

hahaha

ouis je filtrer des images avec filtre de butterworth,aide moi comment

why wp=2*fp/f;

why ws=2*fs/f;

please tell

freq/2 is the Nyquist sampling frequency in digital systems

hehe

fgfg

ouis je filtrer des images avec filtre de butterworth,aide moi comment

Use title not TITLE.

shows error

??? Attempt to execute SCRIPT butter as

a function:

great

how to plot graphs..??

ddczxc

## Post a Comment