From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1574/CH15/EX15.1/BIT_Ex_15_1.sce | 10 ++++++++++ 1574/CH15/EX15.1/Result_of_Chapter_15_Ex15_1.JPG | Bin 0 -> 129094 bytes 1574/CH15/EX15.2/BIT_Ex_15_2.sce | 10 ++++++++++ 1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPG | Bin 0 -> 129038 bytes 1574/CH15/EX15.3/BIT_Ex_15_3.sce | 17 +++++++++++++++++ 1574/CH15/EX15.3/Result_of_Chapter_15_Ex15_3.JPG | Bin 0 -> 132752 bytes 6 files changed, 37 insertions(+) create mode 100755 1574/CH15/EX15.1/BIT_Ex_15_1.sce create mode 100755 1574/CH15/EX15.1/Result_of_Chapter_15_Ex15_1.JPG create mode 100755 1574/CH15/EX15.2/BIT_Ex_15_2.sce create mode 100755 1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPG create mode 100755 1574/CH15/EX15.3/BIT_Ex_15_3.sce create mode 100755 1574/CH15/EX15.3/Result_of_Chapter_15_Ex15_3.JPG (limited to '1574/CH15') diff --git a/1574/CH15/EX15.1/BIT_Ex_15_1.sce b/1574/CH15/EX15.1/BIT_Ex_15_1.sce new file mode 100755 index 000000000..9a60b6e55 --- /dev/null +++ b/1574/CH15/EX15.1/BIT_Ex_15_1.sce @@ -0,0 +1,10 @@ +clc +//Chapter15 +//Example15.1, page no 533 +//Given +P_A=0.5// probability of producing symbol 'A' +P_B=0.25// probability of producing symbol 'B' +P_C=0.25// probability of producing symbol 'C' +H=P_A*log2(1/P_A)+P_B*log2(1/P_B)+P_C*log2(1/P_C)// the source entropy +mprintf('The source entropy is: %f bits/symbol',H) + diff --git a/1574/CH15/EX15.1/Result_of_Chapter_15_Ex15_1.JPG b/1574/CH15/EX15.1/Result_of_Chapter_15_Ex15_1.JPG new file mode 100755 index 000000000..4a02a8791 Binary files /dev/null and b/1574/CH15/EX15.1/Result_of_Chapter_15_Ex15_1.JPG differ diff --git a/1574/CH15/EX15.2/BIT_Ex_15_2.sce b/1574/CH15/EX15.2/BIT_Ex_15_2.sce new file mode 100755 index 000000000..c0cf3bfc6 --- /dev/null +++ b/1574/CH15/EX15.2/BIT_Ex_15_2.sce @@ -0,0 +1,10 @@ +clc +//Chapter15 +//Example15.2, page no 535 +//Given +P_A=0.5,P_B=0.25,P_C=1/32,P_D=1/8,P_E=1/16,P_F=1/32// probabilities of producing respective symbol +H=(P_A*log2(1/P_A))+(P_B*log2(1/P_B))+(P_C*log2(1/P_C))+(P_D*log2(1/P_D))+(P_E*log2(1/P_E))+(P_F*log2(1/P_F))// Source Entropy +n=6,T=1 +mprintf('The source entropy is: %f bits/symbol',round(1000*H)/1000) + + diff --git a/1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPG b/1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPG new file mode 100755 index 000000000..c2deb8d6c Binary files /dev/null and b/1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPG differ diff --git a/1574/CH15/EX15.3/BIT_Ex_15_3.sce b/1574/CH15/EX15.3/BIT_Ex_15_3.sce new file mode 100755 index 000000000..f510b94b1 --- /dev/null +++ b/1574/CH15/EX15.3/BIT_Ex_15_3.sce @@ -0,0 +1,17 @@ +// the Answer in the book is wrong.It is printed as 90.4 for SNR3 but it should be 100.59 +clc +//Chapter15 +//Example15.3, page no 536 +//Given +//a +B1=4e3//Channel Bandwidth +SNR1=31//Channel SNR +C1=B1*log2(1+SNR1)//Channel Capacity +SNR2=14//Reduced SNR +B2=round(C1/log2(1+SNR2))//Bandwidth for reduced SNR with same Channel capacity + +//b +B3=3e3//Reduced Bandwidth +SNR3=(2^(C1/B3))-1//Signal Power for reduced bandwidth +mprintf('a)\n Channel capacity is: %d Kbits/sec\n Bandwidth: %d KHz\nb)\n SNR for 3KHz bandwidth: %f',C1*1e-3,B2*1e-3,SNR3) + diff --git a/1574/CH15/EX15.3/Result_of_Chapter_15_Ex15_3.JPG b/1574/CH15/EX15.3/Result_of_Chapter_15_Ex15_3.JPG new file mode 100755 index 000000000..2a7168459 Binary files /dev/null and b/1574/CH15/EX15.3/Result_of_Chapter_15_Ex15_3.JPG differ -- cgit