summaryrefslogtreecommitdiff
path: root/181/CH3/EX3.27/example3_27.sce
blob: 78b6a80f62839ec3001ba5d6d7ec312c07cd05df (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
// Find currents and voltages
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 3-27 in page 179

clear; clc; close;

// Given data
//Diode acts as short circuited.Both diodes are forward biased
V1=0; // Voltage at junction 1 in V
V2=0; // Voltage at junction 2 in V
 
//Calculation
I1=(20-V1)/(20*10^3);
I2=(V2-(-10))/(20*10^3);

printf("I1 = %0.0e A\n",I1);
printf("I2 = %0.1e A",I2);

// Result
// I1 = 1 mA
// I2 = 0.5 mA