summaryrefslogtreecommitdiff
path: root/3871/CH7/EX7.2/Ex7_2.sce
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3871/CH7/EX7.2/Ex7_2.sce
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.tar.gz
Scilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.tar.bz2
Scilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.zip
Added new codeHEADmaster
Diffstat (limited to '3871/CH7/EX7.2/Ex7_2.sce')
-rw-r--r--3871/CH7/EX7.2/Ex7_2.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/3871/CH7/EX7.2/Ex7_2.sce b/3871/CH7/EX7.2/Ex7_2.sce
new file mode 100644
index 000000000..1abd4fcb4
--- /dev/null
+++ b/3871/CH7/EX7.2/Ex7_2.sce
@@ -0,0 +1,30 @@
+//===========================================================================
+//chapter 7 example 2
+
+clc;clear all;
+
+//variable declaration
+x = 0.004;
+y = 0.707; //power factor lagging
+y1 = 0.5; //power factor lagging
+
+//calculaitons
+theta = atan(x) //theta in degrees
+a = cos(theta)
+b = sin(theta)
+phi = acos(y)
+c = cos(phi)/(a*cos(theta-phi)) //correction factor
+A = cos(phi)/sin(phi);
+e = (b/(A+b))*100 //percentage error in %
+phi1 = acos(y1)
+c1 = cos(phi1)/(a*cos(theta-phi1)) //correction factor
+B = cos(phi1)/sin(phi1);
+e1 = (b/(B+b))*100 //percentage error in %
+
+//result
+mprintf("correction factor when 0.707 pf lagging = %3.3f",c);
+mprintf("\npercentage error =%3.2f percentage ",e);
+mprintf("\ncorrection factor when 0.707 pf lagging = %3.3f",c1);
+mprintf("\npercentage error =%3.1f percentage ",e1)
+
+