diff options
Diffstat (limited to '165/CH1/EX1.1.b/ex1_1_b.sce')
-rw-r--r-- | 165/CH1/EX1.1.b/ex1_1_b.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/165/CH1/EX1.1.b/ex1_1_b.sce b/165/CH1/EX1.1.b/ex1_1_b.sce new file mode 100644 index 000000000..fbb9a2d03 --- /dev/null +++ b/165/CH1/EX1.1.b/ex1_1_b.sce @@ -0,0 +1,14 @@ +//Example 1.1(b)
+clc;
+Yn=20*10^-3; //Expected value
+Xn=18*10^-3; //Measured value
+e=Yn-Xn; //Absolute error
+pe=e*100/Yn; //Percentage error
+RA=1-(e/Yn); //Relative Accuracy
+pa=RA*100; //Percentage Accuracy
+printf('\nExpected value = %.2f mA\n',Yn*1000)
+printf('\nMeasured value = %.2f mA\n',Xn*1000)
+printf('\nAbsolute error = %.2f mA\n',e*1000)
+printf('\nPercentage error = %.2f percent\n',pe)
+printf('\nRelative accuracy = %.2f\n',RA)
+printf('\nPercentage accuracy = %.2f percent\n',pa)
\ No newline at end of file |