summaryrefslogtreecommitdiff
path: root/3836/CH15/EX15.5/Ex15_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '3836/CH15/EX15.5/Ex15_5.sce')
-rw-r--r--3836/CH15/EX15.5/Ex15_5.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3836/CH15/EX15.5/Ex15_5.sce b/3836/CH15/EX15.5/Ex15_5.sce
new file mode 100644
index 000000000..23e6779d8
--- /dev/null
+++ b/3836/CH15/EX15.5/Ex15_5.sce
@@ -0,0 +1,20 @@
+clear
+//
+
+//Initialisation
+I=5 //sinusoidal Current
+R=10 //Resistance in Ohm
+f=50 //Frequency in Hertz
+L=0.025 //Inductancec in Henry
+
+
+//Calculation
+Vr=I*R //Voltage across resistor
+Xl=2*%pi*f*L //Reactance
+VL= I*Xl //Voltage across inductor
+V=sqrt((Vr**2)+(VL**2)) //total voltage
+phi=atan(VL*Vr**-1) //Phase Angle in radians
+
+//Result
+printf("\n (a V = %.1f V",V)
+printf("\n (b V = %.2f V",phi*180/%pi)