summaryrefslogtreecommitdiff
path: root/116/CH3/EX3.1/exa3_1.sce
blob: 6dafadd7ce56d63b73733c84f2c11ef0bb321f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Caption:Program to calculate quantization interval and bits needed to encode each sample
 
//Example 3.1
 
//Page 101
 
sqr=30//SQR=30dB
 
q=1*10^[-(sqr-7.78)/20] 
 
disp('Thus 13 quantization intervals arer needed for each polarity for a total of 26 intervals in all. The number of bitz required are determined as')
 
N=log2(26)
 
//Result
 
//q = 0.078 V

//N = 4.7 = 5 bits per sample