summaryrefslogtreecommitdiff
path: root/2492/CH2/EX2.6/ex2_6.sce
blob: 549de380cd2bcb042a8af101ba4179efe3488db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Exa 2.6
format('v',9)
clc;
clear;
close;
// Given data
R_L = 50;// in ohm
V = 10;// in V
R = 5;// in ohm
V_D = (V*R)/(R_L+R);// in V
R_D = (R_L*R)/(R_L+R);// in ohm
I_D = V_D/R_D;// in A
I_D = I_D * 10^3;// in mA
plot([V_D,0],[0,I_D])
xlabel("V_D in volts");
ylabel("I_D in mA");
title("DC load line");
disp("DC load line shown in figure")
slope = -1/R_D;
disp(slope,"The slope of the dc load line is : ");