6. (5 points) Suppose you can get an annual interest rate(as a decimal). You wan
ID: 2254499 • Letter: 6
Question
6. (5 points) Suppose you can get an annual interest rate(as a decimal). You want to save S dollars over N years. You will need to make a monthly deposit of
Emily can afford to save $90 per month. What interest rate will she need in order to have $10,500 in 7 years? Start with an interest rate of r= 0.01 (too low). Use while loop to increase the rate by 0.001 until the desired output is reached. Your code may look cleaner if you define M as an anonymous function before the while loop.
(1 +r/12)V -1Explanation / Answer
Solution
S = 90;
r = 0.01;
N = 7;
M=0;
while M<= 10500
M =S*((r/12)/(((1+r/12)^(12*N))-1));
r=r+0.001;
endwhile
fprintf("%f",r);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.