summaryrefslogtreecommitdiff
path: root/2414/CH9/EX9.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2414/CH9/EX9.3
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 '2414/CH9/EX9.3')
-rwxr-xr-x2414/CH9/EX9.3/Ex9_3.sce33
1 files changed, 33 insertions, 0 deletions
diff --git a/2414/CH9/EX9.3/Ex9_3.sce b/2414/CH9/EX9.3/Ex9_3.sce
new file mode 100755
index 000000000..a0c9f221d
--- /dev/null
+++ b/2414/CH9/EX9.3/Ex9_3.sce
@@ -0,0 +1,33 @@
+clc;
+close();
+clear();
+//page no 309
+//prob no. 9.3
+//input graph
+t=[0:.1:15-.1];
+y=[(1/9)*(0:.1:1)^2 (1/8)*(1.1:.1:1.9)^2.1];
+y=[y (7/8)*sin(2*%pi*t(21:150)/18.5)];
+plot(t,y);
+y=8*y;
+//quantized form
+y1=[];
+for i=1:10:150
+ for m=-7:7
+ if y(i) < m+0.5 then
+ break();
+ end
+ end
+
+ y1=[y1 m*ones(1:10)]
+end
+y1=y1./8;
+plot2d(t,y1,[5]);
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+// Some operations on entities created by plot2d ...
+a=gca();
+a.isoview='off';
+a.children // list the children of the axes
+xtitle('Analog and quantized signals','t,ms','Normalised signal level')
+xgrid()