I am trying to form a conditional loop that shows the growth of money, I put in $1000 every year and it grows by 85 for ten years but keep returning one value
1 次查看(过去 30 天)
显示 更早的评论
I am trying to make it add $1000 every year and have an 8% return over 10 years but don't know how to access my previous value in my loop
money=1000;
supersaver=1000;
y=zeros(1,10);
for i=1:10
y(i)=(money+supersaver)*1.08
end
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Install Products 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!