summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.8
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.8
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.8')
-rw-r--r--1445/CH2/EX2.8/Ex2_8.sce23
1 files changed, 7 insertions, 16 deletions
diff --git a/1445/CH2/EX2.8/Ex2_8.sce b/1445/CH2/EX2.8/Ex2_8.sce
index adfd7b625..4c5492c4e 100644
--- a/1445/CH2/EX2.8/Ex2_8.sce
+++ b/1445/CH2/EX2.8/Ex2_8.sce
@@ -1,31 +1,22 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 8
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 8");
-//Given
-//V=300.cos(314.t+20) volts
-//i=15.cos(314.t-10) Amp
-//
//VARIABLE INITIALIZATION
-//V=300.cos(314.t+20) volts
-//V=300.sin(314.t+110) volts as cos(theta)=sin(theta+90)
-//i=15.cos(314.t-10) Amp
-//i=15.sin(314.t+80) Amp as cos(theta)=sin(theta+90)
-//Now
-V=300/sqrt(2); //in Volts
-angle_V=110; //in degrees
+v=300/sqrt(2); //in Volts
+angle_v=110; //in degrees
I=15/sqrt(2); //in Amperes
angle_I=80; //in degrees
//SOLUTION
-Z=V/I; //circuit impedance
-angle_Z=angle_V-angle_I; //angle between current and voltage
+Z=v/I;
+angle_Z=angle_v-angle_I;
disp(sprintf("The circuit impedance is %d Ω",Z));
disp(sprintf("The phase angle is %d degrees",angle_Z));
-//Pav=Vm*Im.cos (phi) in RL circuit
-Pav=V*I*cos(angle_Z*(%pi/180)); //to convert angle_z from degrees to radians
-disp(sprintf("The average power drawn is %7.2f W",Pav));// textboo answer is 1949.85 w
+p_av=v*I*cos(angle_Z*(%pi/180)); //to convert angle_z from degrees to radians
+disp(sprintf("The average power drawn is %f W",p_av));
//END