summaryrefslogtreecommitdiff
path: root/620/CH25/EX25.17/example25_17.sce
blob: f4d93cadcb3631382fd763dc58d167231db40cf7 (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
m_i=58;
deg_i=35*%pi/180;
i=m_i*(cos(deg_i)+%i*sin(deg_i));
m_i1=35;
deg_i1=-20*%pi/180;
i1=m_i1*(cos(deg_i1)+%i*sin(deg_i1));
m_v=120;
deg_v=0;
disp("Part a");
i2=i-i1;
a=real(i2);
b=imag(i2);
m_i2=sqrt(a^2+b^2);
deg_i2=atan(b/a)*180/%pi;
disp("the current (in mA) in the other branch has a magnitude of"); disp(m_i2);
disp("with a phase angle(in degrees) of"); disp(deg_i2);
disp("Part b");
m_z=m_v/m_i;
deg_z=deg_v-deg_i;
disp("the total impedance (in kΩ) of the circuit has a magnitude of"); disp(m_z);
disp("with a phase angle (in degrees) of"); disp(deg_z);
disp("Part c");
z=m_z*(cos(deg_z)+%i*sin(deg_z));
p=(m_i*10^(-3))^2*real(z)*10^3;
disp("the total true power dissipated (in W)"); disp(p);