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 /2096/CH1/EX1.50.c/ex_1_50_c.sce | |
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 '2096/CH1/EX1.50.c/ex_1_50_c.sce')
-rwxr-xr-x | 2096/CH1/EX1.50.c/ex_1_50_c.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/2096/CH1/EX1.50.c/ex_1_50_c.sce b/2096/CH1/EX1.50.c/ex_1_50_c.sce new file mode 100755 index 000000000..010decbb0 --- /dev/null +++ b/2096/CH1/EX1.50.c/ex_1_50_c.sce @@ -0,0 +1,26 @@ +//Example 1.50.c // standard deviation
+clc;
+clear;
+close;
+//given data :
+n=8;
+a=412;
+b=428;
+c=423;
+d=415;
+e=426;
+f=411;
+g=423;
+h=416;
+q=(a+b+c+d+e+f+g+h)/n;
+d1=a-q;
+d2=b-q;
+d3=c-q;
+d4=d-q;
+d5=e-q;
+d6=f-q;
+d7=g-q;
+d8=h-q;
+d=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8))/n;
+s=sqrt(((d1^2)+(d2^2)+(d3^2)+(d4^2)+(d5^2)+(d6^2)+(d7^2)+(d8^2))/(n-1));
+disp(s,"the standard deviation(kHz) = ")
|