blob: b32dc20ccbbbd36b7ac0445869de80ec2710f54f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
clear;
clc;
//Example 5.3
R1=30;
R2=20;
RD=20;
Vdd=5;
Vtn=1;
Kn=0.1;
Vgs=R2*Vdd/(R1+R2);
printf('\nVgs=%0.2f V\n',Vgs)
I_D=Kn*(Vgs-Vtn)^2;
printf('\nthe drain current=%0.1f mA\n',I_D)
Vds=Vdd-I_D*RD;
printf('\ndrain to source voltage=%0.1f V\n',Vds)
|