summaryrefslogtreecommitdiff
path: root/3812/CH2/EX2.19.a
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3812/CH2/EX2.19.a
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3812/CH2/EX2.19.a')
-rw-r--r--3812/CH2/EX2.19.a/2_19_a.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/3812/CH2/EX2.19.a/2_19_a.sce b/3812/CH2/EX2.19.a/2_19_a.sce
new file mode 100644
index 000000000..486a6bba9
--- /dev/null
+++ b/3812/CH2/EX2.19.a/2_19_a.sce
@@ -0,0 +1,25 @@
+//Example 2_19 <a>
+//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=ones(1,Max_Limit);
+N1=0:Max_Limit-1;
+x(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;