summaryrefslogtreecommitdiff
path: root/293/CH2
diff options
context:
space:
mode:
Diffstat (limited to '293/CH2')
-rwxr-xr-x293/CH2/EX2.1.c/eg2_1c.sce27
1 files changed, 14 insertions, 13 deletions
diff --git a/293/CH2/EX2.1.c/eg2_1c.sce b/293/CH2/EX2.1.c/eg2_1c.sce
index 42a65d44e..a0f263d98 100755
--- a/293/CH2/EX2.1.c/eg2_1c.sce
+++ b/293/CH2/EX2.1.c/eg2_1c.sce
@@ -1,14 +1,15 @@
-//c - a
-R1 = 10; // first resistance in ohms
-I = 1; // current source
-V = I*R1; // voltage across R
-disp("c - a)")
-disp(V,"voltage across the resistor (in volts)=")
-disp(I,"current flowing through the resistor (in amps) =")
-
-//c - b
-Vr1 = I*R1; // voltage across R1
-Vr2 = I*R2; //voltage across R2
-disp("c - b)")
-disp(Vr,"voltage across the resistor (in volts)=")
+//c - a
+R1 = 10; // first resistance in ohms
+ R2 = 5;
+I = 1; // current source
+V = I*R1; // voltage across R
+disp("c - a)")
+disp(V,"voltage across the resistor (in volts)=")
+disp(I,"current flowing through the resistor (in amps) =")
+
+//c - b
+Vr1 = I*R1; // voltage across R1
+Vr2 = I*R2; //voltage across R2
+disp("c - b)")
+disp(V,"voltage across the resistor (in volts)=")
disp(I,"current flowing through the resistor (in amps) =") \ No newline at end of file