You are on page 1of 2

22BEC032 : Dharmik Shingala

Exp : 6

A)

clc;clear all;
fsamp = 10000;
fcuts = [2000 2500];
mags = [1 0];
devs = [0.005 0.005];

[n,Wn] = kaiserord(fcuts,mags,devs,fsamp);
b=fir1(n,Wn);
[H,w]=freqz(b,1);
plot(w/pi,abs(H))
axis([0 1 0.96 1.04])

Inference : We analayse different type window and we show differnece in Bandwidth and plot of window using
"window" funciton in command window.

B)

clc; clear all;


alpP=1;
alpS=40;

1
pb_edge_freq=0.3*pi;
pb_stopband_freq=0.5*pi;

m=(3.32*pi)/abs(pb_edge_freq - pb_stopband_freq);
n=round(2*m +1);

Wn=(pb_edge_freq+pb_stopband_freq)/(2*pi);

b=fir1((n-1),Wn,hamming(n));
freqz(b,1)

Inference : We make the FIR filter of given requirement. So we use hamming filter because it satifies our
requirement for Relative attenutaion.
Conclusion : In this exp we learn how to make filtter and that filter can be use in communicaiton system.

You might also like