summaryrefslogtreecommitdiff
path: root/3673/CH5/EX5.7/Ex5_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '3673/CH5/EX5.7/Ex5_7.sce')
-rw-r--r--3673/CH5/EX5.7/Ex5_7.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/3673/CH5/EX5.7/Ex5_7.sce b/3673/CH5/EX5.7/Ex5_7.sce
new file mode 100644
index 000000000..9d02a03fe
--- /dev/null
+++ b/3673/CH5/EX5.7/Ex5_7.sce
@@ -0,0 +1,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