summaryrefslogtreecommitdiff
path: root/3754/CH5/EX5.3/5_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '3754/CH5/EX5.3/5_3.sce')
-rw-r--r--3754/CH5/EX5.3/5_3.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/3754/CH5/EX5.3/5_3.sce b/3754/CH5/EX5.3/5_3.sce
new file mode 100644
index 000000000..80321b97e
--- /dev/null
+++ b/3754/CH5/EX5.3/5_3.sce
@@ -0,0 +1,25 @@
+clear//
+
+//Variables
+
+Vs = 100 //Source Voltage (in volts)
+I = 5 //Current entering the circuit (in Ampere)
+IL = 5 //Current leaving the circuit (in Ampere)
+R15 = 15 //Resistor of 15 ohm (in ohm)
+V15 = 30 //Voltage across 15 ohm resistor (in ohm)
+
+//Calculation
+
+I1 = V15 / R15 //Current through 15 ohm resistor (in Ampere)
+IA = I + I1 //Current entering junction A (in Ampere)
+//Applying Kirchoff's current law
+I2 = I + I1 //Current through 5 ohm resistor (in Ampere)
+IB = I2 //Current entering juction B (in Ampere)
+IR = IA - IL //Current through R (in Ampere)
+//Applying Kirchoff's voltage law
+//(7 * 5) + (2 *R) - 100 + 30 =0
+R = 35.0/2
+
+//Result
+
+printf("\n The value of R is %0.3f ohm.",R)