summaryrefslogtreecommitdiff
path: root/1445/CH4/EX4.9/Ex4_9.sce
blob: 525572a7f0ecdee04f756fd45b843b8b5e7925e1 (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
29
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 9

clc;
disp("CHAPTER 4");
disp("EXAMPLE 9");

//VARIABLE INITIALIZATION
I=50;                     //in Amperes
v=230;                    //in Volts
rev=61;                   //revolutions
t=37/3600;                //from seconds to hours
m_c=500;                  //meter constant in rev/kwh
pow_fact=1;               //since load is purely resistive

//SOLUTION
E1=(v*I*t*pow_fact)/1000; //energy consumed in 37 seconds in kWh
E2=rev/m_c;               //energy consumption registered by meter
err=(E2-E1)/E1;
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