Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose, starting at his 25th birthday, Michael deposits $5000 at the beginning

ID: 3544172 • Letter: S

Question

Suppose, starting at his 25th birthday, Michael deposits $5000 at the beginning of every year into a retirement annuity that pays 9% interest per year, compounded annually. He wants to retire when his annuity first reaches or exceeds $1 million. Besides, for a better money management, Michael's annual deposits grow by 6% each year. So the first year he puts in $5000, the second year $5300, the third year $5618, etc.

In how many years will he be able to retire with this plan? Write a Matlab m-file using an While loop. (if necessary, you can use an IF statement) Print the codes and results

Explanation / Answer

line MATLAB Code

1   Balance = 5000; %initialize Balance

2   year = 0; %initialize year counter

3   while Balance < 1000000

4   Balance = (1.09)*Balance + 5000;

5   year = year + 1; %update year counter

6   end

7   year, Balance %This will display the year and the

8 corresponding balance that first broke $1 million.


When this code is entered, the following output results: year = 34.00, Balance = 1078553.77

Thus, Michael will be able to retire at age 59, with a nest egg of $1,078,553.77.