summaryrefslogtreecommitdiff
path: root/182/CH2/EX2.3/example2_3.sce
blob: 005821aa521106d9c5d210b0c396818f705ed66c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

//example 2-2 in page 20
clc;
//given data
V1=100;//stated voltage one
V2=80;//stated voltage two
e1=(1/100)*V1;//absolute error of v1
e2=(5/100)*V2;//absolute error of v2
//calculation
e=e1+e2;//absolute error for the sum of the voltages
E=V1-V2;// difference voltage
emax=(e/E)*100;//maximum percentage error
printf("E=%d V +/- %d percent",E,emax);
//result
//E=20 V +/- 25 percent