diff options
Diffstat (limited to '1445/CH4/EX4.5/Ex4_5.sce')
-rw-r--r-- | 1445/CH4/EX4.5/Ex4_5.sce | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/1445/CH4/EX4.5/Ex4_5.sce b/1445/CH4/EX4.5/Ex4_5.sce index 92c7bc1cf..d61469385 100644 --- a/1445/CH4/EX4.5/Ex4_5.sce +++ b/1445/CH4/EX4.5/Ex4_5.sce @@ -1,6 +1,7 @@ //CHAPTER 4- MEASURING INSTRUMENTS //Example 5 +clc; disp("CHAPTER 4"); disp("EXAMPLE 5"); @@ -14,10 +15,10 @@ 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)); +disp(sprintf("The number of revolutions made by the meter is %f",rev)); err=(rev_act-rev)/rev; //error 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 |