summaryrefslogtreecommitdiff
path: root/2048/CH4/EX4.2/aconv2.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2048/CH4/EX4.2/aconv2.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 '2048/CH4/EX4.2/aconv2.sce')
-rwxr-xr-x2048/CH4/EX4.2/aconv2.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/2048/CH4/EX4.2/aconv2.sce b/2048/CH4/EX4.2/aconv2.sce
new file mode 100755
index 000000000..026cad325
--- /dev/null
+++ b/2048/CH4/EX4.2/aconv2.sce
@@ -0,0 +1,20 @@
+// Plot of -0.9^n1(-n-1)
+// 4.2
+
+exec('stem.sci',-1);
+exec('label.sci',-1);
+
+a = 0.9;
+n = -10:20;
+y = zeros(1,size(n,'*'));
+for i = 1: length(n)
+ if n(i)<= -1,
+ y(i) = -(a^n(i));
+ else y(i) = 0;
+ end
+end
+stem(n,y)
+label('u2',4,'Time(n)','-0.9^n1(-n-1)',4)
+
+
+