summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.41/Ex2_41.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH2/EX2.41/Ex2_41.sce')
-rw-r--r--1445/CH2/EX2.41/Ex2_41.sce7
1 files changed, 4 insertions, 3 deletions
diff --git a/1445/CH2/EX2.41/Ex2_41.sce b/1445/CH2/EX2.41/Ex2_41.sce
index 48ca080c2..5d1c14a4e 100644
--- a/1445/CH2/EX2.41/Ex2_41.sce
+++ b/1445/CH2/EX2.41/Ex2_41.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 41 // read it as example 40 in the book on page 2.99
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 41");
@@ -15,18 +16,18 @@ lampI=lampW/lampV;
lampR=lampW/lampI^2; //W=I^2.R
//
disp("SOLUTION (a)");
-disp(sprintf("The resistance of the lamp is t is %.2f Ohms", lampR));
+disp(sprintf("The resistance of the lamp is t is %f Ohms", lampR));
//
//in purely resistive / non inductive circuit,V=IR applies, and R=lampR+R
R=V/lampI-lampR;
-disp(sprintf("The value value of resistor to be placed in series with the lamp is %.0f Ohms", R));
+disp(sprintf("The value value of resistor to be placed in series with the lamp is %f Ohms", R));
//
//in case of inductance
//XL=2*%pi*f*L;
//V=Z.I where Z^2=R^2+XL^2
//L=sqrt((V^2/I^2-R^2)/2*%pi*f)
L=sqrt((V/lampI)^2-lampR^2)/(2*%pi*f);
-disp(sprintf("The inductive resistance to be placed is %.4f H",L));
+disp(sprintf("The inductive resistance to be placed is %f H",L));
disp(" ");
//
//END