summaryrefslogtreecommitdiff
path: root/116/CH3
diff options
context:
space:
mode:
Diffstat (limited to '116/CH3')
-rwxr-xr-x116/CH3/EX3.1/exa3_1.sce36
-rwxr-xr-x116/CH3/EX3.2/exa3_2.sce50
-rwxr-xr-x116/CH3/EX3.4/exa3_4.sce44
3 files changed, 65 insertions, 65 deletions
diff --git a/116/CH3/EX3.1/exa3_1.sce b/116/CH3/EX3.1/exa3_1.sce
index 6dafadd7c..e2f8746de 100755
--- a/116/CH3/EX3.1/exa3_1.sce
+++ b/116/CH3/EX3.1/exa3_1.sce
@@ -1,19 +1,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
-
+
+
+//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 \ No newline at end of file
diff --git a/116/CH3/EX3.2/exa3_2.sce b/116/CH3/EX3.2/exa3_2.sce
index f2c233f69..8953c29e4 100755
--- a/116/CH3/EX3.2/exa3_2.sce
+++ b/116/CH3/EX3.2/exa3_2.sce
@@ -1,26 +1,26 @@
-//Caption:Program to calculate the minimum bit rate for a PCM encoder must provide for high fidelity
-
-//Example 3.2
-
-//Page 105
-
-dr=40//dynamic range=400dB
-
-SNR=50//signal to noise ratio =5 0dB
-
-SQR=dr+SNR
-
-n=[(SQR-1.76)/6.02]
-
-disp('This can be approximated to 15 bits per sample')
-
-disp('Assuming excess sampling factor using D-type channel, we choose sampling rate as 48KHz')
-
-disp('Therefore required bit rate is')
-
-15*48000
-
-//Result
-
-//720kbps
+
+
+//Example 3.2
+
+//Page 105
+
+dr=40//dynamic range=400dB
+
+SNR=50//signal to noise ratio =5 0dB
+
+SQR=dr+SNR
+
+n=[(SQR-1.76)/6.02]
+
+disp('This can be approximated to 15 bits per sample')
+
+disp('Assuming excess sampling factor using D-type channel, we choose sampling rate as 48KHz')
+
+disp('Therefore required bit rate is')
+
+15*48000
+
+//Result
+
+//720kbps
\ No newline at end of file
diff --git a/116/CH3/EX3.4/exa3_4.sce b/116/CH3/EX3.4/exa3_4.sce
index eb0c422f7..def0f0f09 100755
--- a/116/CH3/EX3.4/exa3_4.sce
+++ b/116/CH3/EX3.4/exa3_4.sce
@@ -1,23 +1,23 @@
-//Caption:Program to calculate how many bits per sample can be saved by using DPCM
-
-//Example 3.4
-
-//Page 128
-
-w=800//Omega=800Hz
-
-//x(t)=A sin(2pi.wt), equation for sine wave with maximum amplitude
-
-//x'(t)=A(2pi).w.cos(2pi.wt), diff w.r.t time
-
-(2*%pi)*800*(1/8000)
-
-//0.62831*a, x'(t)max
-
-disp('savings in the bits per sample can be determined as ')
-
-log2(1/0.628)
-
-//Result
-
+
+
+//Example 3.4
+
+//Page 128
+
+w=800//Omega=800Hz
+
+//x(t)=A sin(2pi.wt), equation for sine wave with maximum amplitude
+
+//x'(t)=A(2pi).w.cos(2pi.wt), diff w.r.t time
+
+(2*%pi)*800*(1/8000)
+
+//0.62831*a, x'(t)max
+
+disp('savings in the bits per sample can be determined as ')
+
+log2(1/0.628)
+
+//Result
+
//0.67 bits \ No newline at end of file