summaryrefslogtreecommitdiff
path: root/978/CH2/EX2.1/Example2_1.sce
blob: 2916451cdcef24687f104943bdb4627fb9bf190d (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
//chapter2,Example2_1,pg 23

//for fig. 2.7

ic=1*10^-3//constant current source

Rf=15*10^3//feedback resistance

Rs=10*10^3//input resistance

Rx=1*10^3//unknown resistance

Vo1=ic*Rf*(Rx/(1+(Rx*Rs)))//output voltage case-1

printf("output voltage for case-1\n")

printf("\nVo1=%.4f V\n",Vo1)

//for fig. 2.8

R1=10//unknown resistance

R2=1*10^3//input resistance

Vo2=ic*Rx*(R1/(1+R1*R2))//output voltage case-2

printf("output voltage for case-2\n")

printf("\nVo2=%.4f V\n",Vo2)