diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3542/CH8/EX8.3/Ex8_3.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3542/CH8/EX8.3/Ex8_3.sce')
-rw-r--r-- | 3542/CH8/EX8.3/Ex8_3.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/3542/CH8/EX8.3/Ex8_3.sce b/3542/CH8/EX8.3/Ex8_3.sce new file mode 100644 index 000000000..a9e7966f5 --- /dev/null +++ b/3542/CH8/EX8.3/Ex8_3.sce @@ -0,0 +1,33 @@ +// Example no 8.3
+// To compute the minimum encoding rateof given 4 sub-band coder
+// Page no. 427
+
+clc;
+clear all;
+
+// Given data
+N=4; // Total number of sub-bands
+L1=225; // Lower limit of first sub-band
+U1=450; // Lower limit of first sub-band
+L2=450; // Lower limit of second sub-band
+U2=900; // Lower limit of second sub-band
+L3=1000; // Lower limit of third sub-band
+U3=1500; // Lower limit of third sub-band
+L4=1800; // Lower limit of fourth sub-band
+U4=2700; // Lower limit of fourth sub-band
+E1=4; // Encoding bit of first sub-band
+E2=3; // Encoding bit of second sub-band
+E3=2; // Encoding bit of third sub-band
+E4=1; // Encoding bit of fourth sub-band
+
+// Sampling rate of the sub-bands according to Nyquist theorem
+sr1=2*(U1-L1); // Sampling rate of first sub-band in samples/second
+sr2=2*(U2-L2); // Sampling rate of second sub-band in samples/second
+sr3=2*(U3-L3); // Sampling rate of third sub-band in samples/second
+sr4=2*(U4-L4); // Sampling rate of fourth sub-band in samples/second
+
+// Total encoding rate
+SR=sr1*E1+sr2*E2+sr3*E3+sr4*E4; // Total encoding rate in bps
+
+// Displaying the result in command window
+printf('\n Total encoding rate = %0.1f kbps',SR*10^-3);
|