Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Matlab grader HW 2, Problem 6 Problem b - Montniy loan payment and total interest paid over a term 3 solutions submitted (max: Unlimited) View
Matlab grader HW 2, Problem 6
Problem b - Montniy loan payment and total interest paid over a term 3 solutions submitted (max: Unlimited) View my solutions 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 interest paid T over the full term of the loan is then T = An-P Write a script to determine the total interest paid over the full term of a loan for the following two cases: 1. Annual interest percentage rate of r = 4.25% and a 20 year term. Assign the calculated monthly payment to the variable Payment 20year. Assign the total interest paid to a variable named Interest 20year. 2. Annual interest percentage rate of r = 4.875% and a 30 year term. Assign the calculated monthly payment to the variable Payment 30year. Assign the total interest paid to a variable named Interest 30year. Code has already been provided to assign the value of the loan principal and assign it to the variable LoanPrincipal. Do not assign a new value to LoanPrincipal in your script. Script o C Reset 10 MATLAB Documentation 1 %Define loan principal 2 LoanPrincipal = 150000; 3 i = r/12; 4 A = i*LoanPrincipal*(1+i)^x/(1+i)^x-1; 5 T = A*n - LoanPrincipal; 6 Payment20rear = 0.0425; 7 Interest20year = solve(A, 240) *; 8 Payment 30year = 0.04875; 9 Interest 30year = solve(A, 360); 10 Run Script
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