How much money will I accumulate over x amount of years
2 次查看(过去 30 天)
显示 更早的评论
Create a loop to find how much money I will have after n amount of years. You have an initial deposit of $1000 and add $65 each month to an account that gains 1.5% each month. How much money will you have after 13 years?
2 个评论
回答(1 个)
James Tursa
2020-6-5
编辑:James Tursa
2020-6-5
Those last three lines need to be put into a loop. That is, each month this happens to the balance
balance = balance * (1 + r) + d
So, start the balance out at the initial value d0, and then the loop needs to iterate this line for x times.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Function Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!