From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1964/CH5/EX5.12/ex5_12.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 1964/CH5/EX5.12/ex5_12.sce (limited to '1964/CH5/EX5.12/ex5_12.sce') diff --git a/1964/CH5/EX5.12/ex5_12.sce b/1964/CH5/EX5.12/ex5_12.sce new file mode 100755 index 000000000..57490cc8e --- /dev/null +++ b/1964/CH5/EX5.12/ex5_12.sce @@ -0,0 +1,22 @@ +//Chapter-5, Example 5.12, Page 170 +//============================================================================= +clc +clear +//INPUT DATA +C=50;//capacitance in uf +R=100;//resistance in ohms +V=200;//supply voltage in volts +f=50;//freq in hz +//CALCULATIONS +Xc=1/(2*%pi*f*C*10^-6);//capacitive reactance in ohms +Z=R-((%i)*Xc);//impedance in ohms +disp(Z); +z1=sqrt((R)^2+(Xc)^2); +theta=atan(Xc/R); +pf=cos(theta);//powerfactor +I=V/z1;//current in A +P=V*I*pf;//power in Watts +mprintf("Thus current,power factor,power are % 1.2f A ,%1.3f ,%d W respectively",I,pf,P); +//=================================END OF PROGRAM====================================================================================================== + +; -- cgit