summaryrefslogtreecommitdiff
path: root/3673/CH8/EX8.a.13/Example_a_8_13.sce
blob: e8baf6fe9cf8bcc0d692a8391f07e53eaf5264e7 (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
30
//Example_a_8_13 page no:333
clc;
V_mag=200;
V_ang=0;
X1=25;
I2=200/50;
//when R1=10;
R1=10;
I1_mag=V_mag/sqrt(R1^2+X1^2);
I1_ang=0-atand(X1/R1);
I1_real=I1_mag*cosd(I1_ang);
I1_imag=I1_mag*sind(I1_ang);
I1=I1_real+(%i*I1_imag);
Imax=I1+I2;
Imax_mag=sqrt(real(Imax)^2+imag(Imax)^2);
Imax_ang=atand(imag(Imax)/real(Imax));
disp(Imax_mag,"the magnitude of maximum current is (in A)");
disp(Imax_ang,"the angle of maximum current is (in degree)");
//when R1=50;
R1=50;
I1_mag=V_mag/sqrt(R1^2+X1^2);
I1_ang=0-atand(X1/R1);
I1_real=I1_mag*cosd(I1_ang);
I1_imag=I1_mag*sind(I1_ang);
I1=I1_real+(%i*I1_imag);
Imax=I1+I2;
Imax_mag=sqrt(real(Imax)^2+imag(Imax)^2);
Imax_ang=atand(imag(Imax)/real(Imax));
disp(Imax_mag,"the magnitude of minimum current is (in A)");
disp(Imax_ang,"the angle of minimum current is (in degree)");