Chapter 8: Problem 9
Suppose that you have a sum of money \(P\) in an interest-bearing account at a local bank ( \(P\) stands for present value). If the bank pays you interest on the money at a rate of \(i\) percent per year and compounds the interest monthly, the amount of money that you will have in the bank after \(n\) months is given by the equation $$ F=P\left(1+\frac{i}{1200}\right)^{n} $$ where \(F\) is the future value of the account and \(\frac{i}{12}\) is the monthly percentage interest rate (the extra factor of 100 in the denominator converts the interest rate from percentages to fractional amounts). Write a MATLAB program that will read an initial amount of money \(P\) and an annual interest rate \(i\), and will calculate and wriv out a table showing the future value of the account every month for the next 5 years. The table should be written to an output file called "interest': Be sure to properly label the columns of your table.