summaryrefslogtreecommitdiff
path: root/165/CH1/EX1.4/ex1_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '165/CH1/EX1.4/ex1_4.sce')
-rw-r--r--165/CH1/EX1.4/ex1_4.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/165/CH1/EX1.4/ex1_4.sce b/165/CH1/EX1.4/ex1_4.sce
new file mode 100644
index 000000000..768a448f5
--- /dev/null
+++ b/165/CH1/EX1.4/ex1_4.sce
@@ -0,0 +1,13 @@
+//Example 1.4
+clc;
+d_dev=[];
+Xn=[49.7,50.1,50.2,49.6,49.7]; //Given Data
+X=mean(Xn); //Mean
+disp(X,'Aritmatic Mean')
+for i=1:5
+ d=Xn(1,i)-X;
+ d_dev=[d_dev,d];
+end
+dtotal=sum(d_dev);
+disp(d_dev,'Deviations from each value')
+disp(dtotal,'Algebraic sum of deviations') \ No newline at end of file