summaryrefslogtreecommitdiff
path: root/135/CH13/EX13.3/EX3.sce
blob: 64c24f5b09f75469e9ae10ee5cae03a7b7aea858 (plain)
1
2
3
4
5
6
7
8
// Example 12.3: Efficiency
clc, clear
P_ac=2; // in watts
ICQ=150e-3; // in amperes
VCC=36; // in volts
P_dc=VCC*ICQ; // in watts
eta=P_ac*100/P_dc; // Efficiency in percentage
disp(eta,"Efficiency (%) =");