summaryrefslogtreecommitdiff
path: root/52/CH6/EX6.14.a/Example6_14_a.sce
blob: 1484a05899ce0466f58f3e2e97fedf48cf5fadf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//Example 6.14a
//Program to Plot Magnitude Responce of ideal Hilbert Transformer
//using Rectangular Window 
//N=11
clear;
clc ;
close ;
N=11;
U=6;
h_Rect=window('re',N);
for n=-5+U:1:5+U
if n==6  
hd(n)=0;      
else
hd(n)=(1-cos(%pi*(n-U)))/(%pi*(n-U));
end
h(n)=hd(n)*h_Rect(n);
end
[hzm ,fr]= frmag (h,256) ;
figure
plot (2*fr ,-hzm);
a = gca ();
xlabel ('Frequency w*pi');
ylabel ('H(exp(j*w))');
title ('Frequency Response of Hilbert Transformer with N=11 using Rectangular Window');
xgrid (2);