summaryrefslogtreecommitdiff
path: root/1445/CH4/EX4.7
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH4/EX4.7
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1445/CH4/EX4.7')
-rw-r--r--1445/CH4/EX4.7/Ex4_7.sce5
1 files changed, 3 insertions, 2 deletions
diff --git a/1445/CH4/EX4.7/Ex4_7.sce b/1445/CH4/EX4.7/Ex4_7.sce
index 9dc6529ee..0d93f14aa 100644
--- a/1445/CH4/EX4.7/Ex4_7.sce
+++ b/1445/CH4/EX4.7/Ex4_7.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 7
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 7");
@@ -14,10 +15,10 @@ 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 %.0f",rev_true));
+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 %.2f %%",err));
+disp(sprintf("The percentage error is %f %%",err));
if(err<0) then
disp("The negative sign indicates that the meter will run slow");
end