summaryrefslogtreecommitdiff
path: root/2459/CH9/EX9.3/Ex9_3.sce
blob: 2a8cfcef5bb0fdcc519c028858c90a90a24ee2d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//chapter9
//example9.3
//page146

R1=50 // ohm
R2=5 // ohm
V=10 // V

Eo=V*R2/(R1+R2) // thevenin voltage
Ro=R1*R2/(R1+R2) // thevenin resistance
I_D=Eo/Ro // current through diode in ampere

printf("current through diode = %.3f mA \n",I_D*1000)