summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.29/Ex2_29.sce
blob: 0f2920b3b486bebe6d918e19b0397b99a9024394 (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
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 29 // read it as example 28 in the book on page 2.83

clc;
disp("CHAPTER 2");
disp("EXAMPLE 29");

//VARIABLE INITIALIZATION
I=120;                           //Amplitude in Amps
f=60;                            //Hz 
t1=1/360;                        //in sec time to find amplitude
i2=96;                           //in Amps ,2 to find time taken to reach this
//SOLUTION
//i=Isin(wt)
//solution (a)
w=2*%pi*f;
i=I*sin(w*t1);
disp("SOLUTION (a)");
disp(sprintf("The amplitude at time %f sec is %f Amp",  t1,i)); 
//solution (b)
t2=(asin(i2/I))/w; 
disp("SOLUTION (b)");
disp(sprintf("The time taken to reach %f Amp is %f Sec",  i2,t2));
disp(" "); 
// 
//END