diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2360/CH2/EX2.6 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2360/CH2/EX2.6')
-rwxr-xr-x | 2360/CH2/EX2.6/ex2_6.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/2360/CH2/EX2.6/ex2_6.sce b/2360/CH2/EX2.6/ex2_6.sce new file mode 100755 index 000000000..96092a493 --- /dev/null +++ b/2360/CH2/EX2.6/ex2_6.sce @@ -0,0 +1,22 @@ +// Exa 2.6
+format('v',7);clc;clear;close;
+// Given data
+// Value of readings
+x=[147.2 147.4 147.9 148.1 147.7 147.5 147.6 147.4 147.6 147.5]
+n = 10;// number of reading
+sigma_x=0;// initialization of variable
+for i=1:1:n
+ sigma_x= sigma_x+x(i);// sum of readings
+end
+x_bar= sigma_x/n;// mean value
+disp(x_bar,"The arthmatic mean is");
+sigma_d_sq=0;
+for i=1:1:n
+ d(i)=x(i)-x_bar;
+ sigma_d_sq= sigma_d_sq+d(i)*d(i);
+end
+sigma = sqrt( sigma_d_sq/(n-1) );// standard deviation
+disp(sigma,"The standard deviation is");
+// probable error of average of the ten reading
+e_m = 0.6745 * ( sigma/(sqrt(n-1)) );
+disp(e_m,"The probable error of average of the ten reading is");
|