summaryrefslogtreecommitdiff
path: root/3754/CH35/EX35.14/35_14.sce
diff options
context:
space:
mode:
Diffstat (limited to '3754/CH35/EX35.14/35_14.sce')
-rw-r--r--3754/CH35/EX35.14/35_14.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3754/CH35/EX35.14/35_14.sce b/3754/CH35/EX35.14/35_14.sce
new file mode 100644
index 000000000..e8aa2ff76
--- /dev/null
+++ b/3754/CH35/EX35.14/35_14.sce
@@ -0,0 +1,19 @@
+clear//
+
+//Variables
+
+V1 = -2.0 //Voltage (in volts)
+V2 = 2.0 //Voltage (in volts)
+V3 = -1.0 //Voltage (in volts)
+R1 = 200.0 * 10**3 //Resistance (in ohm)
+R2 = 250.0 * 10**3 //Resistance (in ohm)
+R3 = 500.0 * 10**3 //Resistance (in ohm)
+Rf = 1.0 * 10**6 //Resistance (in ohm)
+
+//Calculation
+
+Vout = (-Rf/R1*V1) + (-Rf/R2*V2) + (-Rf/R3*V3) //Output voltage (in volts)
+
+//Result
+
+printf("\n Output voltage is %0.3f V.",Vout)