diff options
author | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
commit | f35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch) | |
tree | eb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH2/EX2.41 | |
parent | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff) | |
download | Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2 Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip |
updated the code
Diffstat (limited to '1445/CH2/EX2.41')
-rw-r--r-- | 1445/CH2/EX2.41/Ex2_41.sce | 7 |
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 |