summaryrefslogtreecommitdiff
path: root/1895/CH11/EX11.2/EXAMPLE11_2.SCE
blob: 5947283ab5467c0ede4aa6f43409a3ecba7e995c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//ANALOG AND DIGITAL COMMUNICATION
//BY Dr.SANJAY SHARMA
//CHAPTER 11
//Information Theory
clear all;
clc;
printf("EXAMPLE 11.2(PAGENO 488)");
//given
Px_i = 1/4//probability of a symbol

//calculation
Ix_i = (log(1/Px_i))/log(2)//formula for amount of information of a symbol

//result
printf("\n\ni. Amount of information  = %.2f bits",Ix_i)