summaryrefslogtreecommitdiff
path: root/1445/CH3/EX3.2/Ex3_2.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.2/Ex3_2.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.2/Ex3_2.sce')
-rw-r--r--1445/CH3/EX3.2/Ex3_2.sce5
1 files changed, 3 insertions, 2 deletions
diff --git a/1445/CH3/EX3.2/Ex3_2.sce b/1445/CH3/EX3.2/Ex3_2.sce
index c5a2d35e0..c3ef9143f 100644
--- a/1445/CH3/EX3.2/Ex3_2.sce
+++ b/1445/CH3/EX3.2/Ex3_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 2
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 2");
@@ -14,9 +15,9 @@ v_ph=v_l/sqrt(3); //phase voltage = (line voltage)/sqrt(3)
z_ph=v_ph/I_l; //phase current = line current for star connection
pow_fact=p/(sqrt(3)*v_l*I_l); //three-phase power = sqrt(3)*v_l*I_l*pow_fact
r_ph=z_ph*pow_fact; //from impedance tringle
-disp(sprintf("The resisatnce of each impedance is %.2f Ω",r_ph));
+disp(sprintf("The resisatnce of each impedance is %f Ω",r_ph));
x_ph=sqrt((z_ph^2)-(r_ph^2));
-disp(sprintf("The ractance of each impedance is %.2f Ω",x_ph));
+disp(sprintf("The ractance of each impedance is %f Ω",x_ph));
//END