summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.7
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.7
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.7')
-rw-r--r--1445/CH2/EX2.7/Ex2_7.sce15
1 files changed, 8 insertions, 7 deletions
diff --git a/1445/CH2/EX2.7/Ex2_7.sce b/1445/CH2/EX2.7/Ex2_7.sce
index 97183894a..a2b70e663 100644
--- a/1445/CH2/EX2.7/Ex2_7.sce
+++ b/1445/CH2/EX2.7/Ex2_7.sce
@@ -1,24 +1,25 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 7
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 7");
//VARIABLE INITIALIZATION
-s1=300; //apparent power absorbed by the plant in kVA
+s1=300; //apparent power in kVA
pf1=0.65; //power factor(lagging)
pf2=0.85; //power factor(lagging)
//SOLUTION
//solution (a)
-p=s1*pf1; //active power P=S.cos(Φ)
-q1=sqrt((s1^2)-(p^2)); //Q=sqrt(S^2-P^2) in kVAr
-disp(sprintf("(a) To bring the power factor to unity, the capacitor bank should have a capacity of %3.0f kVAR",q1));
+p=s1*pf1; //active power
+q1=sqrt((s1^2)-(p^2));
+disp(sprintf("(a) To bring the power factor to unity, the capacitor bank should have a capacity of %f kVAR",q1));
//solution (b)
-s2=p/pf2; //since P=S.cos(Φ)
-q2=sqrt((s2^2)-(p^2)); //Q=sqrt(S^2-P^2) in kVAr
-disp(sprintf("(b) To bring the power factor to 85%% lagging, the capacitor bank should have a capacity of %3.0f kVAR",q2));
+s2=p/pf2;
+q2=sqrt((s2^2)-(p^2));
+disp(sprintf("(b) To bring the power factor to 85%% lagging, the capacitor bank should have a capacity of %f kVAR",q2));
//END