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/CH4/EX4.5/Ex4_5.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/CH4/EX4.5/Ex4_5.sce')
-rw-r--r-- | 1445/CH4/EX4.5/Ex4_5.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/1445/CH4/EX4.5/Ex4_5.sce b/1445/CH4/EX4.5/Ex4_5.sce new file mode 100644 index 000000000..92c7bc1cf --- /dev/null +++ b/1445/CH4/EX4.5/Ex4_5.sce @@ -0,0 +1,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; //load current in Amperes +v=230; //supply voltage in Volts +pow_fact=0.8; +rev_act=360; //actual number of revolutions + +//SOLUTION +E=(v*I*pow_fact)/1000; //'E' is energy consumed in one hour in kWh +rev=m_c*E; //number of revolutions for true energy +disp(sprintf("The number of revolutions made by the meter is %.0f",rev)); +err=(rev_act-rev)/rev; //error +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 + |