summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.49/Ex1_49.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH1/EX1.49/Ex1_49.sce')
-rw-r--r--1445/CH1/EX1.49/Ex1_49.sce9
1 files changed, 5 insertions, 4 deletions
diff --git a/1445/CH1/EX1.49/Ex1_49.sce b/1445/CH1/EX1.49/Ex1_49.sce
index 1691f133c..5f51bf880 100644
--- a/1445/CH1/EX1.49/Ex1_49.sce
+++ b/1445/CH1/EX1.49/Ex1_49.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 49
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 49");
@@ -17,16 +18,16 @@ I1=4; //charging
I2=6; //charging
r1=((v1-v2)-((I1+I2)*r))/I1;
r2=((v1-v3)-((I1+I2)*r))/I2;
-disp(sprintf("(a) R1= %.2f Ω",r1));
-disp(sprintf(" R2= %.2f Ω",r2));
+disp(sprintf("(a) R1= %f Ω",r1));
+disp(sprintf(" R2= %f Ω",r2));
//solution (b)
I1=2; //discharging
I2=20; //charging
r1=((v1-v2)-((I2-I1)*r))/(-I1);
r2=((v1-v3)-((I2-I1)*r))/I2;
-disp(sprintf("(b) R1= %.2f Ω",r1));
-disp(sprintf(" R2= %.2f Ω",r2));
+disp(sprintf("(b) R1= %f Ω",r1));
+disp(sprintf(" R2= %f Ω",r2));
//solution (c)
I1=0;