summaryrefslogtreecommitdiff
path: root/671/CH4/EX4.48/4_48.sce
blob: 1c85dc228c3319225045e6a91a117223992d7d5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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(100,120)
V1=complex(Vr,Vc)

I=10
w=5000
R=10000
L=2.4E-3
C=0.05E-3


[Vr,Vc]=polar_to_cart(96,60)
Vl=complex(Vr,Vc)

Xl=w*L*%i
Xc=1/(w*C*%i)

Il=Vl/Xl
Ic=I-Il
V2=(R+Xc)*Ic+V1
V3=V2-Vl
V1=Ic*Xc

disp(V1,V2,V3)