summaryrefslogtreecommitdiff
path: root/226/CH2/EX2.3/example3_sce.sce
blob: 5db0241356b115d5a4f10192e2727e735bee7c65 (plain)
1
2
3
4
5
6
7
8
9
//chapter 2
//example 2.3
//page 40
printf("\n")
printf("given")
R1=4.7*10^3;E=15;Vf=.7;
disp("diode current is E=If*R1+Vf")
If=((E-Vf)/R1)*10^3;
printf(" diode current is %3.2fmA\n",If)