From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 851/CH7/EX7.41/Figure7_41.sce | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 851/CH7/EX7.41/Figure7_41.sce (limited to '851/CH7/EX7.41/Figure7_41.sce') diff --git a/851/CH7/EX7.41/Figure7_41.sce b/851/CH7/EX7.41/Figure7_41.sce new file mode 100755 index 000000000..56dea8971 --- /dev/null +++ b/851/CH7/EX7.41/Figure7_41.sce @@ -0,0 +1,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)') -- cgit