summaryrefslogtreecommitdiff
path: root/2471/CH2/EX2.2/Ex2_2.sce
blob: 19147c661fb7eaa5891e7fbce550cdef9bf34727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
clear ;
clc;
// Example 2.2
printf('Example 2.2\n\n');
printf('Page No. 45\n\n');

// given
C= 35000;// cost of boiler
C_grant=0;// Capital grant available from goverment
E= -(C-(C_grant*C));// Net expenditure
Fs= 15250;// Fuel Saving
r_i = 0.15;// interest
r_t = 0.55;// tax

a = [0 E Fs 0 E+Fs r_i*(E+Fs) 0 ]
bal_1 = a(5)+a(6)-a(7)// Total  Balance after 1st year

c_all = 0.55;// capital allowance in 2nd year
C_bal= (bal_1+0+Fs+(-(c_all*E)));// Cash Balance after 2nd year
b = [bal_1 0 Fs -(c_all*E) C_bal r_i*C_bal r_t*(Fs+(r_i*C_bal))];
bal_2 = b(5)+b(6)-b(7)//Total  Balance after 2nd year

c = [bal_2 0 Fs 0 bal_2+Fs r_i*(bal_2+Fs) r_t*(Fs+(r_i*(bal_2+Fs)))]
bal_3= c(5)+c(6)-c(7)// Total  Balance after 3rd year

if(bal_2>0) then
    disp('pay back period is of two year')
else
    disp('pay back period is of three year')
end

printf('Total saving at the end of second year is %3.2f Pound\n',bal_2);
printf('Total saving at the end of third year is %3.2f Pound\n',bal_3);
// Deviation in answer due to direct substitution