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

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

//VARIABLE INITIALIZATION
r=20;                           //in Ohms

//SOLUTION
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 %f A",I));

//END