summaryrefslogtreecommitdiff
path: root/3507/CH10/EX10.2/Ex10_2.sce
blob: 724cadbd14c12d2554fe4f57a15b2eb07a997077 (plain)
1
2
3
4
5
6
7
8
9
10
11
//chapter10
//example10.2
//page183

Vs=15 // V
Vd=2 // V
Rs=2.2d3 // ohm

If=(Vs-Vd)/Rs

printf("current through LED = %.3f A or %.3f mA",If,If*1000)