summaryrefslogtreecommitdiff
path: root/1574/CH15/EX15.2
diff options
context:
space:
mode:
Diffstat (limited to '1574/CH15/EX15.2')
-rwxr-xr-x1574/CH15/EX15.2/BIT_Ex_15_2.sce10
-rwxr-xr-x1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPGbin0 -> 129038 bytes
2 files changed, 10 insertions, 0 deletions
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
--- /dev/null
+++ b/1574/CH15/EX15.2/Result_of_Chapter_15_Ex15_2.JPG
Binary files differ