summaryrefslogtreecommitdiff
path: root/2534/CH14/EX14.3/Ex14_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '2534/CH14/EX14.3/Ex14_3.sce')
-rwxr-xr-x2534/CH14/EX14.3/Ex14_3.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/2534/CH14/EX14.3/Ex14_3.sce b/2534/CH14/EX14.3/Ex14_3.sce
new file mode 100755
index 000000000..ca4d524a0
--- /dev/null
+++ b/2534/CH14/EX14.3/Ex14_3.sce
@@ -0,0 +1,16 @@
+//Ex14_3
+clc
+Rf = 10*10^3//feedback resistance
+R1 = 10*10^3//resistance 1
+R2 = 2*10^3//resistance 2
+v1 = 10//input voltage across resistance 1
+v2 = 4//input voltage across resistance 2
+//note: according to the given fig. in the textbook for the question we have:
+
+vo = -Rf*((v1/R1)+(v2/R2))//output voltage of adder circuit
+disp("Rf = "+string(Rf)+"ohm")
+disp("R1 = "+string(R1)+"ohm")
+disp("R2 = "+string(R2)+"ohm")
+disp("v1 = "+string(v1)+"V")
+disp("v2 = "+string(v2)+"V")
+disp("vo = -Rf*((v1/R1)+(v2/R2)) = "+string(vo)+"V")