summaryrefslogtreecommitdiff
path: root/3754/CH12/EX12.1/12_1.sce
blob: 68e99e189eb3927e99cdc9e9479963953706978a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clear//

//Variables

I0 = 2 * 10**-7              //Current (in Ampere)
VF = 0.1                     //Forward voltage (in volts)

//Calculation

I = I0 * (exp(40*VF)-1)      //Current through diode (in Ampere)

//Result

printf("\n Current throrough diode is  %0.2f  micro-Ampere.",I*10**6)