summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.33/Ex2_33.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH2/EX2.33/Ex2_33.sce
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-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.33/Ex2_33.sce')
-rw-r--r--1445/CH2/EX2.33/Ex2_33.sce15
1 files changed, 8 insertions, 7 deletions
diff --git a/1445/CH2/EX2.33/Ex2_33.sce b/1445/CH2/EX2.33/Ex2_33.sce
index 3897c5fcc..132e1b1b0 100644
--- a/1445/CH2/EX2.33/Ex2_33.sce
+++ b/1445/CH2/EX2.33/Ex2_33.sce
@@ -1,9 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 33 // read it as example 32 in the book on page 2.86
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 33");
-//Three coils of resistance 20,30,40 ohms and inductance 0.5,0.3 and 0.2 H are connected in series
+
//VARIABLE INITIALIZATION
r1=20; //in Ω
r2=30; //
@@ -16,17 +17,17 @@ f=50; //Hz
//coils connected in series
//
//SOLUTION
-R=r1+r2+r3; //Total resistance
-L=l1+l2+l3; //Total inductance
-XL=2*%pi*f*L;//inductive reactance
+R=r1+r2+r3;
+L=l1+l2+l3;
+XL=2*%pi*f*L;
//impedence Z=sqrt(R*2 +XL^2)
Z=sqrt(R^2 +XL^2);
I=V/Z;
pf=R/Z;
pc=V*I*pf;
-disp(sprintf("The total current is %.3f Amp", I));
-disp(sprintf("The Power Factor is %.3f lagging", pf));
-disp(sprintf("The Power consumed in the circuit is %.1f W", pc));
+disp(sprintf("The total current is %f Amp", I));
+disp(sprintf("The Power Factor is %f lagging", pf));
+disp(sprintf("The Power consumed in the circuit is %f W", pc));
disp(" ");
//
//END