summaryrefslogtreecommitdiff
path: root/2210/CH8/EX8.6/8_6.sce
diff options
context:
space:
mode:
Diffstat (limited to '2210/CH8/EX8.6/8_6.sce')
-rwxr-xr-x2210/CH8/EX8.6/8_6.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/2210/CH8/EX8.6/8_6.sce b/2210/CH8/EX8.6/8_6.sce
new file mode 100755
index 000000000..e1befdc00
--- /dev/null
+++ b/2210/CH8/EX8.6/8_6.sce
@@ -0,0 +1,23 @@
+//Chapter 8, Problem 6
+clc
+f1=70e6 //section 1, frequency in hertz
+f2=5e6 //section 2, frequency in hertz
+f3=400e3 //section 3, frequency in hertz
+f4=80e3 //section 4, frequency in hertz
+
+//calculation
+F3h=f3+f4
+F3l=f3-f4
+
+F2h=f2+F3h
+F2l=f2-F3h
+
+F1h=f1+F2h
+F1l=f1-F2h
+
+printf("Mixer 3 : %d Khz and %d Khz\n",F3h/1000,F3l/1000)
+printf("After filter 3 : %d Khz\n\n",F3h/1000)
+printf("Mixer 2 : %.2f Mhz and %.2f Mhz\n",F2h/10^6,F2l/10^6)
+printf("After filter 2 : %.2f Mhz\n\n",F2h/10^6)
+printf("Mixer 1 : %.2f Mhz and %.2f Mhz\n",F1h/10^6,F1l/10^6)
+printf("After filter 1 : %.2f Mhz\n\n",F1h/10^6)