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 --- 1592/CH7/EX7.19/Example_7_19.sce | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 1592/CH7/EX7.19/Example_7_19.sce (limited to '1592/CH7/EX7.19/Example_7_19.sce') 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') -- cgit