summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.50/Ex2_50.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH2/EX2.50/Ex2_50.sce')
-rw-r--r--1445/CH2/EX2.50/Ex2_50.sce21
1 files changed, 7 insertions, 14 deletions
diff --git a/1445/CH2/EX2.50/Ex2_50.sce b/1445/CH2/EX2.50/Ex2_50.sce
index 1c1aa59a3..e46eac363 100644
--- a/1445/CH2/EX2.50/Ex2_50.sce
+++ b/1445/CH2/EX2.50/Ex2_50.sce
@@ -1,14 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 50
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 50");
-//Given
-//three impedances
-//6+j5 ohm, 8-j6 ohm and 8+j10 ohm
-//Circuit in parallel
-//
//VARIABLE INITIALIZATION
z1=6+(%i*5); //impedance in Ohms
z2=8-(%i*6); //impedance in Ohms
@@ -16,10 +12,10 @@ z3=8+(%i*10); //impedance in Ohms
I=20; //in Amperes
//SOLUTION
-Y1=1/z1; // Admittance
+Y1=1/z1;
Y2=1/z2;
Y3=1/z3;
-Y=Y1+Y2+Y3; // Total admittance
+Y=Y1+Y2+Y3;
//function to convert from rectangular form to polar form
function [Y,angle]=rect2pol(x,y);
Y=sqrt((x^2)+(y^2));
@@ -38,11 +34,8 @@ angle_I2=angle_v-angle2;
I3=v/z3;
angle_I3=angle_v-angle3;
disp("The current in each branch in polar form is-");
-disp(sprintf(" %.3f A, %.2f degrees",I1,angle_I1));
-disp(sprintf(" %.3f A, %.2f degrees",I2,angle_I2));
-disp(sprintf(" %.3f A, %.2f degrees",I3,angle_I3));
-//Total current
-I=I1+I2+I3;
-disp(sprintf("The total current is %.3f A",I)); //Answer not clear in the book
-//
+disp(sprintf(" %f A, %f degrees",I1,angle_I1));
+disp(sprintf(" %f A, %f degrees",I2,angle_I2));
+disp(sprintf(" %f A, %f degrees",I3,angle_I3));
+
//END