diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1445/CH4/EX4.7/ch4_ex_7.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1445/CH4/EX4.7/ch4_ex_7.sce')
-rw-r--r-- | 1445/CH4/EX4.7/ch4_ex_7.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/1445/CH4/EX4.7/ch4_ex_7.sce b/1445/CH4/EX4.7/ch4_ex_7.sce new file mode 100644 index 000000000..82962fd60 --- /dev/null +++ b/1445/CH4/EX4.7/ch4_ex_7.sce @@ -0,0 +1,27 @@ +//CHAPTER 4- MEASURING INSTRUMENTS +//Example 7 + +disp("CHAPTER 4"); +disp("EXAMPLE 7"); + +//VARIABLE INITIALIZATION +m_c=100; //meter constant in rev/kwh +I=20; //in Amperes +v=210; //in Volts +pow_fact=0.8; //leading +rev_act=350; //actual revolution + +//SOLUTION +E=(v*I*pow_fact)/1000; //from Wh to kWh +rev_true=m_c*E; +disp(sprintf("The number of revolutions made by the meter is %f",rev_true)); +err=(rev_act-rev_true)/rev_true; +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 + + |