summaryrefslogtreecommitdiff
path: root/1529/CH16/EX16.3/16_03.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1529/CH16/EX16.3/16_03.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1529/CH16/EX16.3/16_03.sce')
-rwxr-xr-x1529/CH16/EX16.3/16_03.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/1529/CH16/EX16.3/16_03.sce b/1529/CH16/EX16.3/16_03.sce
new file mode 100755
index 000000000..405611f0c
--- /dev/null
+++ b/1529/CH16/EX16.3/16_03.sce
@@ -0,0 +1,13 @@
+//Chapter 16, Problem 3, Fig. 16.3
+clc;
+V=120; //voltage
+f=200; //frequency in hertz
+I=2; //supply current
+pf=0.6; //power factor
+phi=acos(pf);
+Ir=I*pf; //current flowing in the resistor
+Ic=I*sin(phi); //current flowing in the capacitor
+R=V/Ir; //resistance in ohm
+C=Ic/(2*%pi*f*V); //capacitance in faradd
+printf("Capacitance of capacitor = %f uF\n\n",C*10^6);
+printf("Resistance of resistor = %f ohm\n\n",R);