summaryrefslogtreecommitdiff
path: root/1445/CH3/EX3.12/Ex3_12.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH3/EX3.12/Ex3_12.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/CH3/EX3.12/Ex3_12.sce')
-rw-r--r--1445/CH3/EX3.12/Ex3_12.sce9
1 files changed, 5 insertions, 4 deletions
diff --git a/1445/CH3/EX3.12/Ex3_12.sce b/1445/CH3/EX3.12/Ex3_12.sce
index 07ceb2454..a7b1cdf9c 100644
--- a/1445/CH3/EX3.12/Ex3_12.sce
+++ b/1445/CH3/EX3.12/Ex3_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 12
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 12");
@@ -16,19 +17,19 @@ p1=w1+w2;
p2=w1-w2;
phi=atan((sqrt(3)*p2)/p1); //this equation comes from two-wattmeter method
pow_fact=cos(phi);
-disp(sprintf("(a) The power factor of the circuit is %.3f (leading)",pow_fact));
+disp(sprintf("(a) The power factor of the circuit is %f (leading)",pow_fact));
//solution (b)
I_l=p1/(sqrt(3)*v_l*pow_fact);
-disp(sprintf("(b) The line current is %.2f A",I_l));
+disp(sprintf("(b) The line current is %f A",I_l));
//solution (c)
v_ph=v_l/sqrt(3);
z_ph=v_ph/I_l; //phase current = line current for delta connection
r_ph=z_ph*pow_fact;
-disp(sprintf("(c) The resistance of each phase is %.2f Ω",r_ph));
+disp(sprintf("(c) The resistance of each phase is %f Ω",r_ph));
xc=sqrt((z_ph^2)-(r_ph^2));
c=1/(2*%pi*f*xc);
-disp(sprintf("The capacitance of each phase is %.3E F",c));
+disp(sprintf("The capacitance of each phase is %E F",c));
//END