diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /671/CH5/EX5.28/5_28.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '671/CH5/EX5.28/5_28.sce')
-rwxr-xr-x | 671/CH5/EX5.28/5_28.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/671/CH5/EX5.28/5_28.sce b/671/CH5/EX5.28/5_28.sce new file mode 100755 index 000000000..ae10eb3db --- /dev/null +++ b/671/CH5/EX5.28/5_28.sce @@ -0,0 +1,34 @@ +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(4,30)
+V=complex(Vr,Vc)
+
+[Ir,Ic]=polar_to_cart(0.8,-10)
+I=complex(Ir,Ic)
+
+wv=3
+wi=5
+R1=1
+L=2
+R6=6
+C=1/3
+
+//////////deactivating curr source
+Xl=wv*L*%i
+Xc=1/(wv*C*%i)
+Il1=V/(R1+R6+Xl+Xc)
+Pav1=norm(Il1)^2*R1
+
+//////////deactivating voltage source
+Xl=wi*L*%i
+Xc=1/(wi*C*%i)
+Il2=I*(R6+Xl)/(R6+Xl+R1+Xc)
+Pav2=norm(Il2)^2*R1
+
+Pav=Pav1+Pav2
+
+disp(Pav)
\ No newline at end of file |