# hw4 - 1 It is applicable for 2 hw problem Function file...

This preview shows pages 1–4. Sign up to view the full content.

1. It is applicable for 2 hw problem Function file: function [FV]= futurevalue(PV,i,n) FV=PV*(1+i)^n % where FV is future value %PV is present value %i is the intersting rate %n is number of compounding periods Script file %Here is the script to calculate the number 1 t = 0; for k = 0.02:0.01:0.08 t = t + 1; y(t) = futurevalue(500,k,15); disp([y(t) k]) end Result 1.0e+002 * 6.729341691620649 0.000200000000000 1.0e+002 * 7.789837083003826 0.000300000000000 1.0e+002 * 9.004717527534583 0.000400000000000 1.0e+003 * 1.039464089705684 0.000050000000000 1.0e+003 * 1.198279096549846 0.000060000000000 1.0e+003 * 1.379515770357668 0.000070000000000 1.0e+003 * 1.586084557099136 0.000080000000000

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
b/ Script file %Here is the script to calculate the number 2 t = 0; for k = 0.02:0.01:0.08; for PV=500:100:1500; t = t + 1; y(t)= futurevalue(PV,k,15); disp ([y(t) k PV]); end end Result 1.0e+002 * 6.729341691620649 0.000200000000000 5.000000000000000 1.0e+002 * 8.075210029944779 0.000200000000000 6.000000000000000 1.0e+002 * 9.421078368268908 0.000200000000000 7.000000000000000 1.0e+003 * 1.076694670659304 0.000020000000000 0.800000000000000 1.0e+003 * 1.211281504491717 0.000020000000000 0.900000000000000 1.0e+003 * 1.345868338324130 0.000020000000000 1.000000000000000 1.0e+003 * 1.480455172156543 0.000020000000000 1.100000000000000
1.0e+003 * 1.615042005988956 0.000020000000000 1.200000000000000 1.0e+003 * 1.749628839821369 0.000020000000000 1.300000000000000 1.0e+003 * 1.884215673653782 0.000020000000000 1.400000000000000 1.0e+003 *

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.
• Spring '08
• Lake
• The Script, script file, 1.200000000000000 1.0e+003 * 4.123819848457753 0.000080000000000 1.300000000000000 1.0e+003 * 4.441036759877581

{[ snackBarMessage ]}

### Page1 / 9

hw4 - 1 It is applicable for 2 hw problem Function file...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online