Question
Using MatLab: Compound interest can be calculated using the following formula: A = P(1 + r/n)^nt where A = amount of money accumulated after n
Using MatLab:
Compound interest can be calculated using the following formula: A = P(1 + r/n)^nt where A = amount of money accumulated after n years, including interest P = principal amount (the initial amount you borrow or deposit) r = annual rate of interest (as a decimal) t = number of years the amount is deposited or borrowed for n = number of times the interest is compounded per year
Suppose you want to deposit a certain amount annually into an account that earns interest with a target amount in mind. Write a function targetBalance.m that accepts the initial deposit, amount deposited annually, the interest rate, and the number of times interest is compounded annually, and the target amount the user is seeking. Return to the user the time (in years) needed to reach the target amount, as well as, a table with all annual values. Provide the user with a graphical representation of the growth. Run your function with the following values:
annual deposit rate frequency target value $10,000 9% quarterly $1,000,000 $10,000 9% annually $1,000,000 $5,000 8% semi-annually $1,000,000 $10,000 5% annually $1,000,000
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started