summaryrefslogtreecommitdiff
path: root/3169/CH3/EX3.5/Ex3_5.sce
blob: 75fae7f80caa4342fa929b46df87078b4fbabd31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//developed in windows XP operating system
//platform Scilab 5.4.1
clc;clear;
//example 3.5
//calculation of the load voltage,the load current and the diode power

//given data 
Vs=10//source voltage(in V)
Rl=1*10^3//value of resistance(in ohm)
Vd=0.7//voltage drop(in V) across diode

//calculation
Vl=Vs-Vd
//from the equation of ohm's law.....Il=Vl/Rl
Il=Vl/Rl
//from the equation of power dissipation....Pd=Vd*Il
Pd=Vd*Il

printf('the load voltage is %3.1f V',Vl)
printf('\nthe load current is %3.1f mA',Il*10^3)
printf('\nthe diode power is %3.2f mW',Pd*10^3)