summaryrefslogtreecommitdiff
path: root/1529/CH16/EX16.3/16_03.sce
blob: 405611f0c7e73e06bd343ccb9c6f2c6358e68e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);