diff options
Diffstat (limited to '671/CH4/EX4.36/4_36.sce')
-rwxr-xr-x | 671/CH4/EX4.36/4_36.sce | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/671/CH4/EX4.36/4_36.sce b/671/CH4/EX4.36/4_36.sce new file mode 100755 index 000000000..79fc6fb1b --- /dev/null +++ b/671/CH4/EX4.36/4_36.sce @@ -0,0 +1,20 @@ +function [x,y]=polar_to_cart(r,theta)
+ theta=theta/180*%pi
+ x=r*cos(theta)
+ y=r*sin(theta)
+endfunction
+
+[Vr,Vc]=polar_to_cart(120,45)
+V=complex(Vr,Vc)
+
+[Zr,Zc]=polar_to_cart(16.3,24.5)
+Z=complex(Zr,Zc)
+
+w=50
+
+I=V/Z
+P=V*conj(I)
+Pavg=real(P)
+pf=real((V/I)/norm(V/I))
+
+disp(pf,Pavg)
\ No newline at end of file |