Pour n = 1 :
- Code: Tout sélectionner
1. 0. 0. 0.
2. 94651.417 0. 594.
3. 94301.933 244.51616 594.
4. 93951.546 243.61333 349.48384
5. 93600.254 242.70816 350.38667
6. 93248.055 241.80066 351.29184
7. 92894.946 240.89081 352.19934
8. 92540.924 239.97861 353.10919
9. 92185.988 239.06405 354.02139
10. 91830.136 238.14714 354.93595
11. 91473.363 237.22785 355.85286
12. 91115.67 236.30619 356.77215
13. 90757.052 235.38215 357.69381
14. 90397.507 234.45572 358.61785
15. 90037.034 233.52689 359.54428
16. 89675.63 232.59567 360.47311
17. 89313.292 231.66204 361.40433
18. 88950.018 230.726 362.33796
19. 88585.806 229.78755 363.274
20. 88220.652 228.84666 364.21245
21. 87854.556 227.90335 365.15334
22. 87487.513 226.9576 366.09665
23. 87119.523 226.00941 367.0424
24. 86750.581 225.05877 367.99059
- Code: Tout sélectionner
function t=taux(n) // n en années
if n <= 10 then
t = 0.031/12
else
if n <= 15 then
t=0.034/12
else
if n <= 20 then
t=0.035/12
else
if n <= 25 then
t=0.0365/12
else
if n <= 30 then
t=0.0395/12
end
end
end
end
end
endfunction
function [Tab]=pret(n) // n en années
for i = 1:n*24
//R(1) = C;
R(i+1)= (1+taux(n))*R(i) - M ;// Capital dû restant au mois i
I(i+1)= R(i)*taux(n) ;// Intêrets payés au mois i
C(i+1)=M-I(i); // Capital payé au mois i
Tab(i,1:4) = [i R(i) I(i) C(i)];
end
endfunction
R(1)=95000 ;
M=594 ;