summaryrefslogtreecommitdiff
path: root/1316/CH2/EX2.2/example2_2.sce
blob: 239adea0043b4e419c6b846250744e4123e0d5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//Chapter 2
//Example 2.2
//Page 58

clear;
clc;

R1 = 10;
Vs = 5;
R_low = 4;
R_high = 12;


printf("a. The solution is given by VsR2/R1+R2.For R2=4k.ohm,we have\n")
//Calculation of Vd
x = (Vs*R_low)/(R1+R_low);
printf("VD = %.2f V\n",x)
printf("For R2=12k.ohm,we have\n")
//Calculation of Vd
y = (Vs*R_high)/(R1+R_high);
printf("VD = %.2f V\n",y)
printf("b. Thus the voltage varies from %.2f to %.2f V",x,y)
printf("c. The range of output impedance is found from the parallel \n combination of R1 and R2 for the minimum and maximum of R2.\n Simple parallel resistance computation shows that this will be from ")
//Calculation of parallel resistances
a = (R1*R_low)/(R1+R_low);
b = (R1*R_high)/(R1+R_high);
printf("%.2f to %.2f k.ohm",a,b)
printf("d. The power dissipated by the sensor can be determined most easily from V^2/R2,as the voltage across R2 has been calculated.The power dissipated varies from ")
c = (Vs^2)/R_high;
d = (Vs^2)/R_low;
printf("%.4f to %.4f W",c,d)