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

INTRODUCTION: House payments are typically based on a uniform payment series, in

ID: 3822933 • Letter: I

Question

INTRODUCTION: House payments are typically based on a uniform payment series, in which the payment made every month is of the same amount. When a mortgage is taken out from the bank or other lender, the money is essentially "rented"; interest may be thought off as this rental rate. Therefore, the principal (the amount borrowed) and the interest must be paid back to the lending agency. The monthly payment rate, A, may be found from the following equation: A Pli(1+i)nn (((1+i)An)-1)] where Pis the principal, i is the interest rate (5 0.05), and n is the number of payments made. For a 15-year mortgage, there would be 180 payments; for a 30-year mortgage, there would be 360 payments. ASSIGNMENT: Write a MATLAB script that will calculate the monthly payment for interest rates ranging from 0.25% to 5% in 0.25% increments. The program will prompt the user to enter the principal in dollars and the number of years. Use the following prompts in your script: Enter principal in dollars: "Enter number of years: You will need to convert from number of years to number of months. The output report will be printed in MATLAB's Command Window. Before running your MATLAB program, do the following setup: 1) Set the Command Window screen format by selecting: Preferences, Command Window Numeric Format: short g Numeric Display: loose Tab Size: 0 Apply, OK. 2 If needed, expand the Command Window to full screen before executing your program.

Explanation / Answer

% Homework 9

% Your Name
% This program calculates monthly rent on loan

format short g;
format loose;
% Set tab size to 0 from File -> Preferences -> %Editor/Debugger -> Keyboard and Indenting


P = input('Enter principal in dollars: ');
Y = input('Enter number of years: ');

n = Y*12;

fprintf(' MORTGAGE PAYMENT CALCULATIONS ');
fprintf('Principal= $%d ',P);
fprintf('Interest Rate Monthly Payment ');


for i = 0.0025:0.0025:0.05
A = P*(i*(1+i)^n/(((1+i)^n)-1));
fprintf(' %.4f $%.2f ',i,A);
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote