summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.23/Ex2_23.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH2/EX2.23/Ex2_23.sce')
-rw-r--r--1445/CH2/EX2.23/Ex2_23.sce24
1 files changed, 9 insertions, 15 deletions
diff --git a/1445/CH2/EX2.23/Ex2_23.sce b/1445/CH2/EX2.23/Ex2_23.sce
index 7ff187786..c570e9471 100644
--- a/1445/CH2/EX2.23/Ex2_23.sce
+++ b/1445/CH2/EX2.23/Ex2_23.sce
@@ -1,38 +1,32 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
-//Example 22 // read it as example 22 in the book on page 2.76
+//Example 22 (mentioned as 'example 22' in the book)
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 23");
-//Given
-//Equation of an Ac current with respect to origin
-//i=100.sin2.pi.50t
-//i=100.sin 100.pi.t
-//
//VARIABLE INITIALIZATION
-A=100 //Amplitude in Amps
-f=50 //frquency in Hz
-t1=1/600 //sec after wave becomes zero again
-a1=86.6 //amplitude at some time t after start
+A=100 //amplitude in Amperes
+f=50 //frequency in Hz
+t1=1/600 //time in seconds after wave becomes zero again
+a1=86.6 //amplitude in Amperes at some time 't' after start
+
//SOLUTION
//solution (a)
//Amplitude at 1/600 second after it becomes zero
-//
w=f*2*%pi; //angular speed
hp=1/(2*f); //half period, the point where sine beomes zero again after origin
-//The hald period , hp, needs to be added to 1/600 sec
t=hp+t1;
a2=A*sin(w*t);
disp("SOLUTION (a)");
-disp(sprintf("Amplitude after 1/600 sec is %3.0f A", a2));
+disp(sprintf("Amplitude after 1/600 sec is %3f A", a2));
disp(" ");
//solution (b)
//since A=A0.sinwt, t=asin(A/A0)/w
t2=(asin(a1/A))/w;
disp("SOLUTION (b)");
-disp(sprintf("The time at which amp would be %3.2f is %3.3f sec", a1,t2));//text book answer is 1/300 sec
-//
+disp(sprintf("The time at which amp would be %f is %3f sec", a1,t2));
//END