summaryrefslogtreecommitdiff
path: root/1592/CH7/EX7.19/Example_7_19.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1592/CH7/EX7.19/Example_7_19.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1592/CH7/EX7.19/Example_7_19.sce')
-rwxr-xr-x1592/CH7/EX7.19/Example_7_19.sce32
1 files changed, 32 insertions, 0 deletions
diff --git a/1592/CH7/EX7.19/Example_7_19.sce b/1592/CH7/EX7.19/Example_7_19.sce
new file mode 100755
index 000000000..e188cc9aa
--- /dev/null
+++ b/1592/CH7/EX7.19/Example_7_19.sce
@@ -0,0 +1,32 @@
+//Scilab Code for Example 7.19 of Signals and systems by
+//P.Ramakrishna Rao
+//Convolution of two signals
+clc;
+clear;
+clear x y n;
+x=[2,-1,1,0,2];
+y=[1,0,-1,2];
+n=-1:3;
+c = gca();
+c.y_location = "origin";
+c.x_location = "origin";
+plot2d3(n,x,-5);
+title('x(k)')
+xlabel('k')
+figure(1);
+n=0:3;
+c = gca();
+c.y_location = "origin";
+c.x_location = "origin";
+plot2d3(n,y,-5);
+title('y(k)')
+xlabel('k')
+z=conv(x,y);
+figure(2);
+n=-1:6;
+c = gca();
+c.y_location = "origin";
+c.x_location = "origin";
+plot2d3(n,z,-5);
+title('Convoluted signal z(t)')
+xlabel('t')