summaryrefslogtreecommitdiff
path: root/1514/CH18/EX18.3/18_3.sce
blob: a39d6f2fc9f04c0923b841d6e8595689942f9a6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//chapter 18
//example 18.3
//page 569
clear all;
clc ;
//given
E=30;
Vs=10;//supply voltage
Is=500;//ip current
Ih=1.5;//mA
Vf=1;//forward voltage drop
R1max=1000*(E-Vs)/Is;
R1min=(E-Vf)/Ih;
printf("\nmaximum and minimum values of R1 are %d kohm ,%.1f kohm respectively.",R1max,R1min);