Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Early Loan Payoff (while loop and second conditional) O solutions submitted (max: Unlimited) For a term loan with initial principal (total loan amount) value of

image text in transcribedimage text in transcribed

Early Loan Payoff (while loop and second conditional) O solutions submitted (max: Unlimited) For a term loan with initial principal (total loan amount) value of P, the monthly payment A can be computed with the formula: A = iP(1 + i)" (1 + i)" 1 Where i is the monthly interest rate (decimal value), computed from an annual rate (decimal value not percent) r as i = r/12, and n is the number of months in the term of the loan. The total number of monthly payments required to pay off the loan can be reduced significantly by making one extra payment per year (i.e. once every 12 months). Write a function named extraPayments that accepts the following four scalar inputs (in order): The loan principal The annual interest rate . The loan term in years The extra annual payment amount Your function should output the following two scalar values in order): The total interest paid over the duration of the loan. The number of months saved from the original term due to the extra annual payment. Both outputs should be default double precision numeric data type. Do not format as currency. Compute the loan payoff as follows: 1. For each month, the interest that accumulates must be paid in full before any portion of the payment is applied toward the principal balance. The interest due for the kth month, Mx is calculated using the monthly interest rate i and the principal balance from the previous month B-1 as M = ix Bk-1 2. The remaining portion of the monthly payment is applied to reduce the principal balance. The monthly payment is the minimum payment (calculated based on the original loan parameters using the formula given above) unless it is the extra payment month indicated by the month count being divisible by 12. 3. Steps 1 and 2 are repeated each month until the outstanding principal balance is $0.00. Note the final payment to bring the balance to zero may be less than the minimum payment. Note the function command is given in line 1 with suggested names for the input and output variables. You can change the names (but not the order) of these variables if you like. Do not change the name of the function, however, as this exact name is required for the tests to run. Be sure to assign a value to the output variable. Function C Reset MATLAB Documentation 1 function [TotalInterestPaid, MonthsSaved] = extraPayments (LoanAmount, AnnualInterestRate, TermYears, Extra) 2 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Finance questions

Question

What is Larmors formula? Explain with a suitable example.

Answered: 1 week ago