summaryrefslogtreecommitdiff
path: root/147/CH13/EX13.20/Example13_20.sce
blob: d79f36a79952032107bdbca0b123b3d474e567b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Input voltage Vin, Output voltage Vout, Output current Iout
close();
clear;
clc;
Vin = 220;//V
V1 = Vin;
Vout = 110;
V2 = Vout;
Iout = 10;//A
I2 = Iout;
a = V1/V2;
//weight_auto/weight_trans = 'weightr'
weightr = 1 - (2/a)/2;//since N1/N2 = I2/I1 = a
mprintf('We have %0.0f %% saving in copper',weightr*100);