blob: e5d6df7bb7057a0619e2bfb95cc34dd84d7f6889 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//chapter 2
//example 2.1
//page 33
clear all;
clc ;
//given
Rl=100;//load resistor in ohm
Es=5;//supply voltage in volts
//for point A
If1=0;//forward current through diode ,thus drop across resistor is 0 v
Ef1=5; //Ef=voltage drop across diode in volts
//for point B
Ef2=0;
If2=Es/Rl; //in Ampere
If2=If2*10^3;//in mA
plot([Ef1 Ef2],[If1 If2],'-.*')
xtitle('dc load line','voltage drop across diode(V)','current through diode(mA)')
a=gca();
a.data_bounds=[-0.5 -0.5;5.1 52]
printf('dc load line passes through points A(5,0),B(0,50)')
|