Question: Write in MATLAB Create a script that will facilitate your long-term financial planning. Use loops to do the calculations and a loop to print out
Create a script that will facilitate your long-term financial planning. Use loops to do the calculations and a loop to print out the final table. Assume a rate of inflation (3%) and a rate of return (6%) but make variables that can be changed. Write a loop that will calculate the accumulated value of a 401K savings plan for each year from now until retirement. Print out a table, using fprintf) in a loop for each year, of age, salary and accumulated value of the savings plan. Write a second loop that assumes a retirement income as a percent of your salary at retirement and deduct this amount from the plan each year until you die or are broke. Print out this table as a fprintf) in a loop. Each row of the table will use the values from the row before. Start with an age, salary, savings plan and retirement age. (25, 85,000/year, save 15% and retire at 65) Equations: salary(n) salary(n-1)* (1 + inflation) Plan401K(n)- Plan401K(n-1)*(1 + rate of return) + contribution contribution salary* savings rate retirament income salary(retirement) *live on less Reasonable assumptions rate of return 6% inflation 3% live on less 75%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
