summaryrefslogtreecommitdiff
path: root/2297/CH5/EX5.7/Ex5_7.sce
blob: 3d280f2680630f3030fae6309a70d8f894990167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Example 5.7;apparent resistance of the unknown resistor,actual resistance of the unknown resistor and percentage error
clc;
clear;
// given :
format('v',7)
v=200;//voltage in volts
i=5;//current in mA
tr=v/i;//resistance in kilo ohms
disp("part (a)")
disp(tr,"apparent resistance of unknown resistor is,(kilo-Ohm)=")
S=1000;//sensivity in ohms/V
V1=250;//voltage in volts
rv=V1*S*10^-3;//resistance in kilo ohms
rx=(V1*tr)/(V1-tr);//resistance in kilo ohms
disp("part (b)")
disp(rx,"actual resistance of unknown resistor is,(kilo-Ohm)=")
per=(rx-tr)/rx;//percentage error
disp("part (c)")
disp(per*100,"percentage error is,(%)=")