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 --- 1895/CH11/EX11.4/EXAMPLE11_4.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 1895/CH11/EX11.4/EXAMPLE11_4.sce (limited to '1895/CH11/EX11.4') diff --git a/1895/CH11/EX11.4/EXAMPLE11_4.sce b/1895/CH11/EX11.4/EXAMPLE11_4.sce new file mode 100755 index 000000000..3c1b451ae --- /dev/null +++ b/1895/CH11/EX11.4/EXAMPLE11_4.sce @@ -0,0 +1,20 @@ +//ANALOG AND DIGITAL COMMUNICATION +//BY Dr.SANJAY SHARMA +//CHAPTER 11 +//Information Theory +clear all; +clc; +printf("EXAMPLE 11.4(PAGENO 489)"); +//given +Px_1 = 1/4//probability wrt to binary PCM '0' +Px_2 = 3/4//probability wrt to binary PCM '1' + +//calculations +Ix_1 = log2(1/Px_1)//amount of information of zero level with base 2 +Ix_2 = log2(1/Px_2)//amount of information of first level with base 2 +Ix_1= log(1/Px_1)/log(2)//amount of information content with base 10 +Ix_2= log(1/Px_2)/log(2)//amount of information content with base 10 + +//results +printf("\n\ni.Amount of information carried wrt to binary PCM 0 = %.2f bits",Ix_1); +printf("\n\nii.Amount of information carried wrt to binary PCM 1 = %.2f bits",Ix_2); -- cgit