summaryrefslogtreecommitdiff
path: root/851/CH7/EX7.41/Figure7_41.sce
blob: 56dea89711c44ec1ec87d74a1eca7a8a52342696 (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
27
28
29
30
//clear//
//Caption:Matched Filter output of rectangular pulse
//Figure7.41
//Matched Filter Output
clear;
clc;
T =4;
a =2;
t = 0:T;
g = 2*ones(1,T+1);
h  =abs(convol(g,g));
for i = 1:length(h)
  if(h(i)<0.01)
    h(i) =0;
  end
end
h = h-T;
t1 = 0:length(h)-1;
figure
a =gca();
a.data_bounds = [0,0;6,4];
plot2d(t,g,5)
xlabel('t--->')
ylabel('g(t)---->')
title('Rectangular pulse duration T = 4, a =2')
figure
plot2d(t1,h,6)
xlabel('t--->')
ylabel('Matched Filter output')
title('Output of filter matched to rectangular pulse g(t)')