From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3812/CH2/EX2.19.b/2_19_b.sce | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 3812/CH2/EX2.19.b/2_19_b.sce (limited to '3812/CH2/EX2.19.b/2_19_b.sce') diff --git a/3812/CH2/EX2.19.b/2_19_b.sce b/3812/CH2/EX2.19.b/2_19_b.sce new file mode 100644 index 000000000..633529f2c --- /dev/null +++ b/3812/CH2/EX2.19.b/2_19_b.sce @@ -0,0 +1,25 @@ +//Example 2_19 +//compute the Convolution of x[n] and Unit Impulse response h[n] +clear; +close; +clc; +Max_Limit=10; +for n=1:Max_Limit +Alpha=0.5; +h=(0.4)^(n)*ones(1,Max_Limit); +N1=0:Max_Limit-1; +x(n)=(0.8)^(n-1); +end +N2=0:Max_Limit-1; +y=convol(x,h); +N=0:2*Max_Limit-2; +figure +a=gca(); +plot2d3('gnn',N2,x) +xtitle('Input Response Fig 2.5.(a)','n','x[n]'); +a.thickness=2; +figure +a=gca(); +plot2d3('gnn',N(1:Max_Limit),y(1:Max_Limit),5) +xtitle('Output Response Fig 2.7','n','y[n]'); +a.thickness=2; -- cgit