summaryrefslogtreecommitdiff
path: root/3809/CH13/EX13.2/EX13_2.sce
blob: 17b4c2e47806cc7bb70667cbbe9a0f20fb7f21d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Chapter 13, Example 13.2

clc
//Initialisation'
ri=10**3                         //resistance in ohm
rs=100                         //resistance in ohm
rl=50                                //resistance in ohm
ro=10                                  //resistance in ohm
vs=2                               //voltage
ao=10                               //output gain

//Calculation
vi=(ri/(rs+ri))*vs                     //input voltage
vo=ao*vi*(rl/(ro+rl))                  //output voltage
av=vo/vi                                   //voltage gain

//Results
printf("Voltage Gain Av = %.2f",av)