Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IN MATLAB The formula for calculating a car payment is given in the document \'A

ID: 3886531 • Letter: I

Question

IN MATLAB

The formula for calculating a car payment is given in the document 'Amortization' in Blackboard in the folder Assignment #3. Given one car price (P), one interest rate per period (r), and multiple possible payment times (n), compute the monthly payment amount and store the result as variable A

Example:

Input P = 20000, r = .035/12 (3.5% annual rate)

n = [36 48 60] (months)

Output A = [586.0416 447.1200 363.8349]

function A = CarPay(P,r,n)

%replace the line below with the code to compute the monthly payment
A = P;

end

Explanation / Answer

When the number of compounding periods matches the number of payment periods, the rate per period (r) is easy to calculate. Like the above example, it is just the nominal annual rate divided by the periods per year. However, what do you do if you have a Canadian mortage and the compounding period is semi-annual, but you are making monthly payments? In that case, you can use the following formula, derived from the compound interest formula.

[Simple Amortization Calculation Formula]
where

r = rate per payment period
i = nominal annual interest rate
n = number of compounding periods per year
p = number of payment periods per year