diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1895/CH11/EX11.15 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1895/CH11/EX11.15')
-rwxr-xr-x | 1895/CH11/EX11.15/EXAMPLE11_15.SCE | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/1895/CH11/EX11.15/EXAMPLE11_15.SCE b/1895/CH11/EX11.15/EXAMPLE11_15.SCE new file mode 100755 index 000000000..aeabadbe2 --- /dev/null +++ b/1895/CH11/EX11.15/EXAMPLE11_15.SCE @@ -0,0 +1,22 @@ +//ANALOG AND DIGITAL COMMUNICATION
+//BY Dr.SANJAY SHARMA
+//CHAPTER 11
+//Information Theory
+clear all;
+clc;
+printf("EXAMPLE 11.15(PAGENO 497)");
+//given
+//given symbols are equally likely all the symbols the probabilities are same
+Px_1 = 1/4;//probability of first symbol
+Px_2 = 1/4;//probability of second symbol
+Px_3 = 1/4;//probability of third symbol
+Px_4 = 1/4;//probability of fourth symbol
+f_m = poly(0,"f_m");
+r = 2//average symbol rate from problem 11.14
+
+//calculaitons
+H_X = Px_1*log2(1/Px_1) + Px_2*log2(1/Px_2) + Px_3*log2(1/Px_3) + Px_4*log2(1/Px_4);//entropy
+R = H_X*r;//information rate
+
+//results
+printf("\n\ni.The information rate of all symbols = %.2f*f_m bits/seconds", R);
|