summaryrefslogtreecommitdiff
path: root/275/CH1/EX1.1.25/Ch1_1_25.sce
blob: fe9ad3cdc3ffb6b701990a18afa83c65c4a6e841 (plain)
1
2
3
4
5
6
7
8
9
10
11
clc
disp("Example 1.25")
printf("\n")
disp("calculate the diode current")
//given
V=12
R=10^3
Vd=0.7
//diode current
I=(V-Vd)/R
printf("Diode current=%f Ampere",I)