summaryrefslogtreecommitdiff
path: root/1673/CH1/EX1.7/1_7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1673/CH1/EX1.7/1_7.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1673/CH1/EX1.7/1_7.sce')
-rwxr-xr-x1673/CH1/EX1.7/1_7.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1673/CH1/EX1.7/1_7.sce b/1673/CH1/EX1.7/1_7.sce
new file mode 100755
index 000000000..b0b16d58d
--- /dev/null
+++ b/1673/CH1/EX1.7/1_7.sce
@@ -0,0 +1,14 @@
+//absolute error
+//example 1.7
+//page 10
+clc;clear;close;
+n=[0.1532 15.45 0.0000354 305.1 8.12 143.3 0.0212 0.643 0.173];//original numbbers
+//rounding all numbers to 2 decimal places
+n=[305.1 143.3 0.15 15.45 0.00 8.12 0.02 0.64];
+sum=0;
+l=length(n);
+for i=1:l
+ sum=sum+n(i);
+end
+E_A=2*(10^-1)/2+7*(10^-2)/2;
+printf('the absolute error is:%0.2f',E_A);