summaryrefslogtreecommitdiff
path: root/1445/CH4
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH4
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')
-rw-r--r--1445/CH4/EX4.1/Ex4_1.sce3
-rw-r--r--1445/CH4/EX4.10/Ex4_10.sce1
-rw-r--r--1445/CH4/EX4.11/Ex4_11.sce1
-rw-r--r--1445/CH4/EX4.12/Ex4_12.sce1
-rw-r--r--1445/CH4/EX4.2/Ex4_2.sce3
-rw-r--r--1445/CH4/EX4.3/Ex4_3.sce3
-rw-r--r--1445/CH4/EX4.4/Ex4_4.sce5
-rw-r--r--1445/CH4/EX4.5/Ex4_5.sce5
-rw-r--r--1445/CH4/EX4.6/Ex4_6.sce3
-rw-r--r--1445/CH4/EX4.7/Ex4_7.sce5
-rw-r--r--1445/CH4/EX4.8/Ex4_8.sce5
-rw-r--r--1445/CH4/EX4.9/Ex4_9.sce3
12 files changed, 25 insertions, 13 deletions
diff --git a/1445/CH4/EX4.1/Ex4_1.sce b/1445/CH4/EX4.1/Ex4_1.sce
index e46040447..298c0cf4c 100644
--- a/1445/CH4/EX4.1/Ex4_1.sce
+++ b/1445/CH4/EX4.1/Ex4_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 1
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 1");
@@ -12,7 +13,7 @@ ar=15/10000; //area in m^2
//SOLUTION
T_d=N*B*I*ar;
-disp(sprintf("The deflecting torque exerted on the coil is %.3f N-m",T_d));
+disp(sprintf("The deflecting torque exerted on the coil is %f N-m",T_d));
//END
diff --git a/1445/CH4/EX4.10/Ex4_10.sce b/1445/CH4/EX4.10/Ex4_10.sce
index b60ae7828..1d25807e6 100644
--- a/1445/CH4/EX4.10/Ex4_10.sce
+++ b/1445/CH4/EX4.10/Ex4_10.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 10
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 10");
diff --git a/1445/CH4/EX4.11/Ex4_11.sce b/1445/CH4/EX4.11/Ex4_11.sce
index c52886b03..3126484f3 100644
--- a/1445/CH4/EX4.11/Ex4_11.sce
+++ b/1445/CH4/EX4.11/Ex4_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 11
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 11");
diff --git a/1445/CH4/EX4.12/Ex4_12.sce b/1445/CH4/EX4.12/Ex4_12.sce
index 4b5b1249e..006e41585 100644
--- a/1445/CH4/EX4.12/Ex4_12.sce
+++ b/1445/CH4/EX4.12/Ex4_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 12
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 12");
diff --git a/1445/CH4/EX4.2/Ex4_2.sce b/1445/CH4/EX4.2/Ex4_2.sce
index 701df6ff4..2a1b004b4 100644
--- a/1445/CH4/EX4.2/Ex4_2.sce
+++ b/1445/CH4/EX4.2/Ex4_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 2
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 2");
@@ -13,7 +14,7 @@ emf=2; //emf of cell in Volts
//SOLUTION
I=emf/r; //current in the circuit
I_g=(S*I)/(S+G);
-disp(sprintf("The current through the galvanometer is %.3f A",I_g));
+disp(sprintf("The current through the galvanometer is %f A",I_g));
//END
diff --git a/1445/CH4/EX4.3/Ex4_3.sce b/1445/CH4/EX4.3/Ex4_3.sce
index b66ea829a..a6997554a 100644
--- a/1445/CH4/EX4.3/Ex4_3.sce
+++ b/1445/CH4/EX4.3/Ex4_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 3
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 3");
@@ -12,7 +13,7 @@ G=2970; //in Ohms
//SOLUTION
S=(G*I_g)/(I-I_g); //since I_g=(S*I)/(S+G);
-disp(sprintf("The wire should have a resistance of %.0f Ω",S));
+disp(sprintf("The wire should have a resistance of %f Ω",S));
//END
diff --git a/1445/CH4/EX4.4/Ex4_4.sce b/1445/CH4/EX4.4/Ex4_4.sce
index 67b16af41..179ac1fea 100644
--- a/1445/CH4/EX4.4/Ex4_4.sce
+++ b/1445/CH4/EX4.4/Ex4_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 4
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 4");
@@ -15,12 +16,12 @@ V=500; //in Volts
//solution (a)
R_sh=r_A/((I/I_A)-1); //(I/I_A) is the multiplying factor of the shunt
-disp(sprintf("The required shunt resistance is %.2f Ω",R_sh));
+disp(sprintf("The required shunt resistance is %f Ω",R_sh));
//solutuion (b)
r=V/I_A; //total resistance required
R_se=r-r_A;
-disp(sprintf("The required resistance to be added in series is %.3f Ω",R_se));
+disp(sprintf("The required resistance to be added in series is %f Ω",R_se));
//END
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
diff --git a/1445/CH4/EX4.6/Ex4_6.sce b/1445/CH4/EX4.6/Ex4_6.sce
index 73dca4c0c..3c5440055 100644
--- a/1445/CH4/EX4.6/Ex4_6.sce
+++ b/1445/CH4/EX4.6/Ex4_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 6
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 6");
@@ -12,6 +13,6 @@ v=500; //in Volts
//SOLUTION
r_m=v_m/I_m; //resistance of moving-coil instrument
r_s=(v/I_m)-r_m;
-disp(sprintf("The series resistance to measure 500 V on full scale is %.2f Ω",r_s));
+disp(sprintf("The series resistance to measure 500 V on full scale is %f Ω",r_s));
//END
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
diff --git a/1445/CH4/EX4.8/Ex4_8.sce b/1445/CH4/EX4.8/Ex4_8.sce
index d298ccbd6..208eba54d 100644
--- a/1445/CH4/EX4.8/Ex4_8.sce
+++ b/1445/CH4/EX4.8/Ex4_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 8
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 8");
@@ -12,10 +13,10 @@ v=30; //in Volts
//SOLUTION
R_sh=(I_m*r_m)/I; //I_m=I*(R_sh/(R_sh+r_m)) if R_sh<<5Ω, then I_m=I*(R_sh/r_m) neglecting R_sh in the denominator
-disp(sprintf("In order to read upto 2A, a shunt of %.2f Ω has to be connected in parallel",R_sh));
+disp(sprintf("In order to read upto 2A, a shunt of %f Ω has to be connected in parallel",R_sh));
R_se=(v-(I_m*r_m))/I_m;
-disp(sprintf("In order to read upto 30V, a resistance of %.2f Ω has to be connected in series",R_se));
+disp(sprintf("In order to read upto 30V, a resistance of %f Ω has to be connected in series",R_se));
//END
diff --git a/1445/CH4/EX4.9/Ex4_9.sce b/1445/CH4/EX4.9/Ex4_9.sce
index 037cea75c..525572a7f 100644
--- a/1445/CH4/EX4.9/Ex4_9.sce
+++ b/1445/CH4/EX4.9/Ex4_9.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 9
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 9");
@@ -17,7 +18,7 @@ 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));
+disp(sprintf("The percentage error is %f %%",err));
if(err<0) then
disp("The negative sign indicates that the meter will run slow");
end