summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.44/Ex2_44.sce
blob: b01b90a848feb585d7cf0ff3d93a4fb26a57d326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 44

disp("CHAPTER 2");
disp("EXAMPLE 44");

//given
//current in the resistor is given by i=4+5.sin wt - 3.cos 3.wt
//VARIABLE INITIALIZATION
r=20;                           //resistance in Ohms

//SOLUTION
//Power consumed by the resistor is P=P0+P1+P2
p0=(4^2)*r;
p1=((5/sqrt(2))^2)*r;
p2=((3/sqrt(2))^2)*r;
p=p0+p1+p2;
I=sqrt(p/r);
disp(sprintf("The power consumed by the resistor is %d W",p));
disp(sprintf("The effective value of current is %.1f A",I));

//END