summaryrefslogtreecommitdiff
path: root/67/CH2/EX2.59
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /67/CH2/EX2.59
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 '67/CH2/EX2.59')
-rwxr-xr-x67/CH2/EX2.59/example259.sce32
1 files changed, 32 insertions, 0 deletions
diff --git a/67/CH2/EX2.59/example259.sce b/67/CH2/EX2.59/example259.sce
new file mode 100755
index 000000000..2661f9b75
--- /dev/null
+++ b/67/CH2/EX2.59/example259.sce
@@ -0,0 +1,32 @@
+//Example 2.59
+clc;
+n=-8:1:8;
+for i=1:length(n)
+ if n(i)<0 then
+ x(i)=0;
+ h(i)=0;
+ else
+ x(i)=1;
+ h(i)=2^n(i);
+ end
+end
+y=convol(x,h);
+figure
+a=gca();
+plot2d3(n,h);
+a.x_location='origin';
+a.y_location='origin';
+title('Impulse responce');
+figure
+a=gca();
+plot2d3(n,x);
+a.x_location='origin';
+a.y_location='origin';
+title('Input signal');
+figure
+a=gca();
+n1=-16:1:16
+plot2d3(n1,y);
+a.x_location='origin';
+a.y_location='origin';
+title('Output signal'); \ No newline at end of file