blob: 3785f7106095c59f7a6fa667df25707e6dfda788 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Example 3-5, page 67`
clear;clc; close;
// Given data
// the diode is forward biased, equivalent to a battery of 0.7 volts
V=10;// voltage of battery in volts
Vd=0.7;// diode drop in volts
// Calculations
Vl=V-Vd;// load voltage in volts
R=1000;// load resistance in ohms
Il=Vl/R;// load current in amperes
Pd=Il*Vd;// diode power in watts
disp("Amperes",Il,"Load Current=")
disp("Volts",Vl,"Load Voltage=")
disp("Watts",Pd,"Diode power=")
|