summaryrefslogtreecommitdiff
path: root/2471/CH1/EX1.8/Ex1_8.sce
blob: a56f83edc7c5b27f9e2bf34b1d58b9fa0e7a7590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clear ;
clc;
// Example 1.8
printf('Example 1.8\n\n');
printf('Page No. 16\n\n');
// given

qunty= [40 10000 400 90000]
unit_price= [29 0.33 0.18 0.025]
cost= (unit_price .* qunty)// in Pound
common_basis= [310 492 11.7 90]// in 10^6 Wh
per_unit_cost= (unit_price .* qunty) ./ common_basis// Pound per 10^6 Wh
p= 150;// production in tonnes
EI= sum(common_basis)*10^6/150
CI= sum(unit_price .* qunty)/150
printf('energy index is %3.2f Wh per tonne \n',EI)
printf('cost index  is %3.2f Wh per tonne \n',CI)