summaryrefslogtreecommitdiff
path: root/2621/CH10/EX10.2/Ex10_2.sce
blob: 17b1fa97d6f1991a574877fd12537187ad556aef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Example 10.2
clc;
clear;
close;
// Given data
format('v',6);
VR= 12;// in V
IL= 0.5;// in A
RL= 25;// in Ω
// Resistanc required,
R= VR/IL;// in Ω
VL= IL*RL;// in V
Vout= VR+VL;//output voltage in V
Vin= Vout+2;// input voltage in V
disp(Vin,"The input voltage in volts is : ")