summaryrefslogtreecommitdiff
path: root/243/CH4/EX4.9/4_09.sce
blob: 10e169837c8868a9d7ae048003641c131a8567a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Example No. 4_09
//Propagation of Error
//Pg No. 75
clear ; close ; clc ;

x = 0.1234*10^4
y = 0.1232*10^4
d = 4
er_x = 10^(-d + 1)/2
er_y = 10^(-d + 1)/2
ex = x*er_x
ey = y*er_y
ez = abs(ex) + abs(ey)
er_z = abs(ez)/abs(x-y)

mprintf('\n |er_x| <= %.2f o/o\n |er_y| <= %.2fo/o \n ex = %.3f \n ey = %.3f \n |ez| = %.3f \n |er_z| = %.2fo/o \n',er_x *100,er_y*100,ex,ey,ez,er_z*100)