summaryrefslogtreecommitdiff
path: root/3754/CH30/EX30.13/30_13.sce
blob: 7eaff976877945ea276a03988b84782ffc8aa966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clear//

//Variables

gm = 4500.0 * 10**-6                   //Transconductance (in Ampere per volt)
RD = 3.0 * 10**3                       //Drain resistance (in ohm)
RL = 5.0 * 10**3                       //Load  resistance (in ohm) 
Vin = 100.0 * 10**-3                   //Input voltage (in volts)
ID = 2.0 * 10**-3                      //Drain current (in Ampere)

//Calculation

rL = RD * RL / (RD + RL)               //a.c. load resistance (in ohm)
vo = -gm * rL * Vin                    //Output voltage (in volts)   

//Result

printf("\n Output voltage is  %0.3f  V.",vo)