diff options
Diffstat (limited to '3554/CH1/EX1.1/Ex1_1.sce')
-rw-r--r-- | 3554/CH1/EX1.1/Ex1_1.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/3554/CH1/EX1.1/Ex1_1.sce b/3554/CH1/EX1.1/Ex1_1.sce new file mode 100644 index 000000000..4f94dba7e --- /dev/null +++ b/3554/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,15 @@ +//Exa 1.1a
+
+clc;
+clear all;
+
+Yn=80;//voltage across a resistor(Volts)
+Xn=79;//Measured voltage (Volts)
+
+//solution
+e=Yn-Xn; //absolute error
+Pe=(Yn-Xn)/Yn *100;//% error
+A=1-abs((Yn-Xn)/Yn); //relative accuracy
+a=100*A;
+printf('Absolute Error = %d V \n Percentage Error = %.2f percent\n Relative accuracy = %.4f \n Percentage of accuracy = %0.2f percent \n',e,Pe,A,a);
+disp("");
|