summaryrefslogtreecommitdiff
path: root/181/CH2/EX2.18/example2_18.sce
blob: 90286d15f0a29d076579401011acfdfb5aa98796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Calculate forward currents for voltages
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 2-18 in page 98

clear; clc; close;

// Given data
Vt=0.026; // Thermal voltage at room temperature in eV
V=[0.1 0.2 0.3]; // Given voltages in V

// Calculation
V1=0.026*-2.3;
printf("(a)V=%0.2f V\n",V1);
R=(exp(1.92)-1)/(exp(-1.92)-1);
printf("(b)Ration of forward bias current to reverse bias current=%0.2f\n",R);
printf("(c):\n")
for i=1:3
    I=15*(exp(V(i)/0.026)-1);
    printf("I = %0.3e A\n",I);
end

// Result
// (a) V = -0.060 V
// (b) Ratio = -6.83
// (c) Forward currents = 0.687 mA, 32.86 mA and 1.539 A respectively