summaryrefslogtreecommitdiff
path: root/2330/CH2/EX2.1/ex2_1.sce
blob: dbda636bfae741b5484700818277b9ce1665300b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Example 2.1
clc;
clear;
close;
format('v',6)
// given data
Vin= 15;// in V
R_L= 10;// in kΩ
// The output voltage
Vout= Vin ;// in V
// The current
I= Vout/R_L;// in mA
disp(Vout,"The output voltage in volts is : ");
disp(I,"The current in mA is : ");