This is my problem:
%Imagine that you are a proud new parent. You decide to start a college saving plan for your child hoping to have enough money in 18 years to pay for cost of education. Suppose that your folks give you a 1000 dollars to start with and you have a 6% interest per year of 0.5% interest per month. Because of interest payments and your contributions, each month you balance will increase in accordance with the formula:
% New balance = old balance + interest + your contribution
% Write a for loop formula to find the saving account balance in 18 years. Plot the values on a time line with horizontal being time and dollar on the vertical
I'm having a problem getting the matrix a(old_balance) to add on each new value. Any advice for fixing this bug. Please and Thankyou.
old_balance = 1000;interest = .005;a = zeros(217); for time = 0:1/12:18 old_balance = old_balance + 100 + (old_balance * interest); a(old_balance) = old_balanceend
Best Answer