Question: USE MATLAB TO SOLVE EQUATION: 3 . 1 9 Create a function called savings _ balance that determines the balance in a savings account at
USE MATLAB TO SOLVE EQUATION:
Create a function called savingsbalance that determines the balance in a savings account at the end of every year for the first years, where is an input. The account has an initial investment A for example, enter $ as and an annual compounded interest rate of for example, enter as Display the information in a table where the first column is Year and the second is Balance $ Test case: After ten years, the balance is $ With an initial investment of A and interest rate the balance after years is given by:
Approach
For this problem, the function can be expressed as an anonymous function rather than creating a function file. Instead of using an input command for the initial investment and interest rate, just initialize those variables using the values given for the test case. Initialize the time period to the test case values and then call the function to compute the balance for each year.
Create the formatted output as a table showing the year formatted as an integer and the balance formatted with decimal places in columns. Include the appropriate column headings as specified in the problem statement.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
