summaryrefslogtreecommitdiff
path: root/1445/CH4/EX4.5/ch4_ex_5.sce
blob: d19487bd7d23b63a49641d1bc5835bfd8da546fc (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
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 5

disp("CHAPTER 4");
disp("EXAMPLE 5");

//VARIABLE INITIALIZATION
m_c=100;                  //meter constant in rev/kWh
I=20;                     //in Amperes
v=230;                    //in Volts
pow_fact=0.8;
rev_act=360;              //actual revolution

//SOLUTION
E=(v*I*pow_fact)/1000;    //from Wh to kWh
rev=m_c*E;                //number of revolutions for true energy
disp(sprintf("The number of revolutions made by the meter is %f",rev));
err=(rev_act-rev)/rev;
err=err*100;              //percentage error
disp(sprintf("The percentage error is %f %%",err));
if(err<0) then
disp("The negative sign indicates that the meter will run slow");
end

//END