blob: 29041ac35376fd49daff9404ad4e113657bf8a39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
clear//
//Variables
VF = 0.22 //Forward voltage (in volts)
T = 298.0 //Temperature (in kelvin)
I0 = 10**-3 //Current (in Ampere)
n = 1
//Calculation
VT = T/11600 //Volt equivalent of temperature (in volts)
I = I0*(exp(VF/(n*VT))-1) //Diode Current (in Ampere)
//Result
printf("\n Diode current is %0.1f A.",I)
|