232k views
2 votes
ANSWER USING A MATLAB CODE

If your parents had invested $10,000 for your college educstion at an average annual interest rate of 5% 20 years ago, how much would be in the account now?
Also plot any graphs that demonstate the solution
Use inputs such as interest rate, monthly or weekly contributions, etc.

User Gsiener
by
7.1k points

1 Answer

3 votes

Final answer:

The question involves calculating the future value of a $10,000 investment over 20 years with a 5% annual interest rate using the compound interest formula. MATLAB code is provided to perform the calculation and plot the investment's growth over time.

Step-by-step explanation:

The question asks for the future value of an investment made 20 years ago with an annual interest rate of 5%. To calculate this, we can use the compound interest formula, A = P(1 + r/n)^(nt), where P is the principal amount, r is the annual interest rate, n is the number of times interest is compounded per year, t is the number of years, and A is the amount of money accumulated after n years, including interest. Since no additional contributions were mentioned, the formula simplifies to A = P(1 + r)^t because the interest is compounded annually (n=1). Here is the MATLAB code to calculate and plot the growth of the investment:

% MATLAB code
P = 10000; % initial investment
r = 0.05; % annual interest rate
t = 20; % number of years
A = P * (1 + r)^t; % future value of the investment

years = 0:t;
values = P * (1 + r).^years;
plot(years, values);
xlabel('Years');
ylabel('Account Value');
title('Growth of a $10,000 Investment over 20 Years at 5% Interest');

The calculated future value, as well as the growth over time, will be displayed through the plot generated by this code.

User Andrey Ershov
by
7.9k points