summaryrefslogtreecommitdiff
path: root/851/CH6/EX06.1/Figure06_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /851/CH6/EX06.1/Figure06_1.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 '851/CH6/EX06.1/Figure06_1.sce')
-rwxr-xr-x851/CH6/EX06.1/Figure06_1.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/851/CH6/EX06.1/Figure06_1.sce b/851/CH6/EX06.1/Figure06_1.sce
new file mode 100755
index 000000000..0f3496fb3
--- /dev/null
+++ b/851/CH6/EX06.1/Figure06_1.sce
@@ -0,0 +1,30 @@
+//clear//
+//Caption:Nonreturn-to-zero polar format
+//Figure 6.1(b): Discrete PAM Signals Generation
+// [2].Polar NRZ
+//page 235
+clear;
+close;
+clc;
+x = [0 1 0 0 0 1 0 0 1 1];
+binary_negative = [-1 -1 -1 -1 -1 -1 -1 -1 -1 -1];
+binary_positive = [1 1 1 1 1 1 1 1 1 1];
+L = length(x);
+L1 = length(binary_negative);
+total_duration = L*L1;
+//plotting
+a =gca();
+a.data_bounds =[0 -2;L*L1 2];
+for i =1:L
+ if(x(i)==0)
+ plot([i*L-L+1:i*L],binary_negative);
+ poly1= a.children(1).children(1);
+ poly1.thickness =3;
+ else
+ plot([i*L-L+1:i*L],binary_positive);
+ poly1= a.children(1).children(1);
+ poly1.thickness =3;
+ end
+end
+xgrid(1)
+title('Polar NRZ')