blob: 3acddc0750631e1fdeec2dd4e6a5d8ab898b2c5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//EXAMPLE 10.6
//FIlter length for window -based design
clear;
clc;
wp=0.3*%pi;//rad/sec
ws=0.5*%pi;//rad/sec
as=40;//dB
wc=(wp+ws)/2;//cutoff frequency
Bw=ws-wp;
disp(Bw,'Normalized transition bandwidth is = ')
//Hann window
M1=3.11*%pi/Bw;
disp(M1,'Value of M = ')
//Hamming window
M2=3.32*%pi/Bw;
disp(M2,'Value of M = ')
//Blackman window
M3=5.56*%pi/Bw;
disp(M3,'Value of M = ')
|