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/CH3/EX3.3/Ex3_3.sce | |
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/CH3/EX3.3/Ex3_3.sce')
-rw-r--r-- | 1445/CH3/EX3.3/Ex3_3.sce | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/1445/CH3/EX3.3/Ex3_3.sce b/1445/CH3/EX3.3/Ex3_3.sce index e99995138..4af78e160 100644 --- a/1445/CH3/EX3.3/Ex3_3.sce +++ b/1445/CH3/EX3.3/Ex3_3.sce @@ -1,6 +1,7 @@ //CHAPTER 3- THREE-PHASE A.C. CIRCUITS //Example 3 +clc; disp("CHAPTER 3"); disp("EXAMPLE 3"); @@ -16,19 +17,19 @@ f=50; //frequency in Hertz x_ph=2*(%pi)*f*l; //inductive reactance z_ph=sqrt((r_ph^2)+(x_ph^2)); I_ph=v_l/z_ph; //phase voltage = line voltage for delta connection -disp(sprintf("(a) The phase current is %.2f A",I_ph)); +disp(sprintf("(a) The phase current is %f A",I_ph)); //solution (b) I_l=sqrt(3)*I_ph; //phase current = (line current)/sqrt(3) for delta connection -disp(sprintf("(b) The line current is %.2f A",I_l)); +disp(sprintf("(b) The line current is %f A",I_l)); //solution (c) pow_fact=r_ph/z_ph; -disp(sprintf("(c) The power factor is %.3f (lagging)",pow_fact)); +disp(sprintf("(c) The power factor is %f (lagging)",pow_fact)); //solution (d) p=sqrt(3)*v_l*I_l*pow_fact; -disp(sprintf("(d) The power absorbed is %.0f W",p)); +disp(sprintf("(d) The power absorbed is %f W",p)); //Answer is different due to precision of floating point numbers |