diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1445/CH3/EX3.9/Ex4_9.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1445/CH3/EX3.9/Ex4_9.sce')
-rw-r--r-- | 1445/CH3/EX3.9/Ex4_9.sce | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/1445/CH3/EX3.9/Ex4_9.sce b/1445/CH3/EX3.9/Ex4_9.sce new file mode 100644 index 000000000..037cea75c --- /dev/null +++ b/1445/CH3/EX3.9/Ex4_9.sce @@ -0,0 +1,28 @@ +//CHAPTER 4- MEASURING INSTRUMENTS +//Example 9 + +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 %.2f %%",err)); +if(err<0) then +disp("The negative sign indicates that the meter will run slow"); +end + +//END + + + |