summaryrefslogtreecommitdiff
path: root/3673/CH5/EX5.7/Ex5_7.sce
blob: 9d02a03fe4eb3c23a1f3973900aebc5f9990fde4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Example 5_7 page no:197
clc
V=20;
f=5*10^3;//frequency in Hz
R=100;
C=0.2*10^-6//capacitance in farad
Xc=1/(2*%pi*f*C)
Ir=V/R
disp(Ir,"current in the resistance branch is (in A)")
Ic=V/Xc
disp(Ic,"current in the capacitive branch is (in A)")
It=Ir+(%i*Ic)
disp(It,"total current is (in A)")
[It_polar,Theta]=polar(It)
Theta=atand(Ic/Ir)
Z_mag=V/It_polar
Z_ang=0-Theta;
disp(It_polar,"the magnitude of current is (in A)")
disp(Theta,"the angle of current is (in degree)")
disp(Z_mag,"the magnitude of total impedance is (in ohm)")
disp(Z_ang,"the angle of total impedance is (in degree)")
disp("the values varies slightly with text book hence values are rounded off in text book")
//the values varies slightly with text book hence values are rounded off in text book