summaryrefslogtreecommitdiff
path: root/165/CH1/EX1.2/ex1_2.sce
blob: 4ed4c0e30e87811960cf463019178fb3dcd807ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Example 1.2
clc;
//Enter the measurements in a vector
Xn=[98,101,102,97,101,100,103,98,106,99];
//Calculate mean
Y=mean(Xn);
//Extract the 6th element
X6=Xn(1,6);
//Calculate the absolute value
a=abs((X6-Y)/X6);
P=1-a;
printf('\nMean of all the measurements = %.2f \n',Y)
printf('\nPrecision of 6th measurement = %.3f \n',P)