summaryrefslogtreecommitdiff
path: root/3673/CH7/EX7.a.3/Example_a_7_3.sce
blob: 680fb3ec2f13dd892e3df8af0c768664eceea8e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Example_a_7_3 page no:271
clc;
Vmag=10;
Vang=0;
R1=-%i*5;
R2=4-(%i*5);
R1mag=sqrt(real(R1)^2+imag(R1)^2);
R2mag=sqrt(real(R2)^2+imag(R2)^2);
R2ang=atand(imag(R2)/real(R2));
Ztmag=6.24;
Ztang=29.26;
Itmag=Vmag/Ztmag;
Itang=Vang-Ztang;
Inmag=Itmag*R1mag/R2mag;
In=0.466-(%i*1.149);
Zn=4+((3+(%i*5))*(-%i*5)/3);
I2ohm=In*(12.33-(%i*5))/(12.33+2-(%i*5)+(%i*5));
I2ohm_mag=sqrt(real(I2ohm)^2+imag(I2ohm)^2);//current is calculated for calculating power
I2ohm_ang=atand(imag(I2ohm)/real(I2ohm));
P=I2ohm_mag^2*2;
disp(P,"the power in the 2+5j ohm impedence is (in W)");