summaryrefslogtreecommitdiff
path: root/569/CH3/EX3.19/3_19.sci
blob: 2cfbfc5339de1e667b5d5656c3be59b2f6c72f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
// Calculate apparent resistance, actual resistance and error
clc;
Et=40;
It=800*10^-3;
Rt=Et/It;
disp(Rt,'apparent value of resistance (ohm)=')
Rv=1000*150;
Rx=Rt*Rv/(Rv-Rt);
disp(Rx,'true value of resistance(ohm)')
Er_percentage=[(Rt-Rx)/Rx]*100;
disp(Er_percentage,'percentage error=')