summaryrefslogtreecommitdiff
path: root/1184/CH7
diff options
context:
space:
mode:
Diffstat (limited to '1184/CH7')
-rwxr-xr-x1184/CH7/EX7.1/Ex7_1.sce14
-rwxr-xr-x1184/CH7/EX7.2/Ex7_2.sce13
-rwxr-xr-x1184/CH7/EX7.3/Ex7_3.sce12
-rwxr-xr-x1184/CH7/EX7.4/Ex7_4.sce14
-rwxr-xr-x1184/CH7/EX7.5/Ex7_5.sce14
5 files changed, 67 insertions, 0 deletions
diff --git a/1184/CH7/EX7.1/Ex7_1.sce b/1184/CH7/EX7.1/Ex7_1.sce
new file mode 100755
index 000000000..fdc9c846e
--- /dev/null
+++ b/1184/CH7/EX7.1/Ex7_1.sce
@@ -0,0 +1,14 @@
+//Example 7-1, Page No - 210
+
+clear
+clc
+
+t = 71.4*10^-6
+
+f = 1/t
+fourth_harmonic = f*4
+min_sampling = 2*fourth_harmonic
+
+printf('The frequency of the signal is %.1f Khz',f/10^3)
+printf('\n The fourth harmonic is %.1f Khz ',fourth_harmonic/10^3)
+printf('\n Minimum sampling rate is %.1f khz',min_sampling/10^3)
diff --git a/1184/CH7/EX7.2/Ex7_2.sce b/1184/CH7/EX7.2/Ex7_2.sce
new file mode 100755
index 000000000..2ac2d8b63
--- /dev/null
+++ b/1184/CH7/EX7.2/Ex7_2.sce
@@ -0,0 +1,13 @@
+//Example 7-2, Page no - 222
+
+clear
+clc
+
+N = 14
+discrete_levels = 2^N
+num_vltg_inc =2^N-1
+resolution = 12/discrete_levels
+
+printf('The numbedr of discrete levels that are represented \n using N number of bits are %d',discrete_levels)
+printf('\n the number odf voltage increments required to divide \n the voltage range are %d',num_vltg_inc)
+printf('\n Resolution of the digitization %.1f microvolt',resolution*10^6)
diff --git a/1184/CH7/EX7.3/Ex7_3.sce b/1184/CH7/EX7.3/Ex7_3.sce
new file mode 100755
index 000000000..be43d503c
--- /dev/null
+++ b/1184/CH7/EX7.3/Ex7_3.sce
@@ -0,0 +1,12 @@
+//Example 7-3, Page No - 225
+
+clear
+clc
+
+N =12
+SINAD1=78
+SINAD2 = 6.02*N + 1.76
+ENOB =(SINAD1 -1.76)/6.02
+
+printf('The SINAD for 12 bit convertre is %d dB',SINAD2)
+printf('\n The ENOB for the converter with SINAD of 78 dB is %.2f bits',ENOB)
diff --git a/1184/CH7/EX7.4/Ex7_4.sce b/1184/CH7/EX7.4/Ex7_4.sce
new file mode 100755
index 000000000..a0d91e76e
--- /dev/null
+++ b/1184/CH7/EX7.4/Ex7_4.sce
@@ -0,0 +1,14 @@
+//Example 7-4,Page No - 233
+
+clear
+clc
+
+Vm = 1
+Vin = 0.25
+mu =255
+
+Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)
+gain =Vout/Vin
+
+printf('The output voltage of the compander %.2f volt',Vout)
+printf('\n Gain of the compander is %d',gain)
diff --git a/1184/CH7/EX7.5/Ex7_5.sce b/1184/CH7/EX7.5/Ex7_5.sce
new file mode 100755
index 000000000..236d531e2
--- /dev/null
+++ b/1184/CH7/EX7.5/Ex7_5.sce
@@ -0,0 +1,14 @@
+//Example 7-5, Page No - 234
+
+clear
+clc
+
+Vin = 0.8
+Vm =1
+mu =255
+
+Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)
+gain =Vout/Vin
+
+printf('The output voltage of the compander %.2f volt',Vout)
+printf('\n Gain of the compander is %.1f',gain)