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 --- 2276/CH5/EX5.5/chapter5_ex5.sce | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 2276/CH5/EX5.5/chapter5_ex5.sce (limited to '2276/CH5/EX5.5/chapter5_ex5.sce') diff --git a/2276/CH5/EX5.5/chapter5_ex5.sce b/2276/CH5/EX5.5/chapter5_ex5.sce new file mode 100755 index 000000000..e03a23491 --- /dev/null +++ b/2276/CH5/EX5.5/chapter5_ex5.sce @@ -0,0 +1,17 @@ +clc +clear + +//input +r=30;//resistance of a resistance in ohms which is connected in parallel with a bank of capacitors +c=80*(10^-6);//capacitance of bank of capacitors in farad +v=240;//supply voltage in volts +f=50;//supply frequency in hertz + +//calculations +i1=v/r;//current in phase with the voltage in amperes +i2=v*2*%pi*f*c;;//current leading on voltage by 90 degrees in amperes +i=((i1^2)+(i2^2))^0.5;//total current in amperes +phi=(180/%pi)*acos(i1/i);//phase angle in degrees + +//output +mprintf('the total current is %3.0f A leading on the voltage by %3.0f degrees',i,phi) -- cgit