summaryrefslogtreecommitdiff
path: root/3542/CH6/EX6.10/Ex6_10.sce
blob: 29c389cc70a6bde78a8e741afc8f69057276e1b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Example no 6.10
// To demonstrate how the received signal is detected properly using baseband differential detector.
// Page no. 310

clc;
clear all;

// Given data
x1=-0.707;
y1=-0.707;
x2=0.707;
y2=-0.707;
x3=0.707;
y3=0.707;

if x1<0 then                                                          // Applying decision rule
printf('S1 = 0');
else
printf('\n S1 = 1');  
end  
if y1<0 then
printf('\n S2 = 0');
else
printf('\n S2 = 1');  
end  
if x2<0 then
printf('\n S3 = 0');
else
printf('\n S3 = 1');  
end  
if y2<0 then
printf('\n S4 = 0');
else
printf('\n S4 = 1');  
end  
if x3<0 then
printf('\n S5 = 0');
else
printf('\n S5 = 1');  
end  
if y3<0 then
printf('\n S6 = 0');
else
printf('\n S6 = 1');  
end