summaryrefslogtreecommitdiff
path: root/851/CH7/EX7.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /851/CH7/EX7.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 '851/CH7/EX7.3')
-rwxr-xr-x851/CH7/EX7.3/Table7_3.sce37
1 files changed, 37 insertions, 0 deletions
diff --git a/851/CH7/EX7.3/Table7_3.sce b/851/CH7/EX7.3/Table7_3.sce
new file mode 100755
index 000000000..ec59df5cf
--- /dev/null
+++ b/851/CH7/EX7.3/Table7_3.sce
@@ -0,0 +1,37 @@
+//clear//
+//Caption:Illustrating the generation of DPSK signal
+//Table7.3 Generation of Differential Phase shift keying signal
+clc;
+bk = [1,0,0,1,0,0,1,1];//input digital sequence
+for i = 1:length(bk)
+ if(bk(i)==1)
+ bk_not(i) =~1;
+ else
+ bk_not(i)= 1;
+ end
+end
+dk_1(1) = 1&bk(1); //initial value of differential encoded sequence
+dk_1_not(1)=0&bk_not(1);
+dk(1) = xor(dk_1(1),dk_1_not(1))//first bit of dpsk encoder
+for i=2:length(bk)
+ dk_1(i) = dk(i-1);
+ dk_1_not(i) = ~dk(i-1);
+ dk(i) = xor((dk_1(i)&bk(i)),(dk_1_not(i)&bk_not(i)));
+end
+for i =1:length(dk)
+ if(dk(i)==1)
+ dk_radians(i)=0;
+ elseif(dk(i)==0)
+ dk_radians(i)=%pi;
+ end
+end
+disp('Table 7.3 Illustrating the Generation of DPSK Signal')
+disp('_____________________________________________________')
+disp(bk,'(bk)')
+bk_not = bk_not';
+disp(bk_not,'(bk_not)')
+dk = dk';
+disp(dk,'Differentially encoded sequence (dk)')
+dk_radians = dk_radians';
+disp(dk_radians,'Transmitted phase in radians')
+disp('_____________________________________________________')