PLEASE HELP, MATLAB, answers are very appreciated need to
study
pl
2.
%Define the function mortgage_a
function [mlP, tCost] = mortgage_a(P, r, y)
%Calculate monthly payment
mlP = P*((r*(1+r)^(12*y)/((1+r)^(12*y)-1)));
%Calculate total payments
%Total number of months
tMonth = 12*y;
tCost = tMonth*mlP;
%Display the results
fprintf("Your monthly loan payment is $%0.2f\n", mlP);
fprintf("You will have to make %d monthly payment for a total cost
of $%0.2f\n", tMonth, tCost);
end
Output:
b.
%Define the function mortgage_b
function mortgage_b(P, r)
j = 1;
y = 15;
for i = P:-5000:50000
%Calculate monthly payment
m(j) = i;
mlP15(j) = i*(r/12)/(1-(1+(r/12))^(-12*y));
j = j+1;
end
k = 1;
y = 30;
for i = P:-5000:50000
%Calculate monthly payment
mlP30(k) = i*(r/12)/(1-(1+(r/12))^(-12*y));
k =k+1;
end
%Display the results
fprintf("Principal\t15 year Payment\t30 year Payment\n");
for k=1:j-1
fprintf("$%d\t\t $%0.2f\t\t $%0.2f\n", m(k), mlP15(k),
mlP30(k));
end
Output:
PLEASE HELP, MATLAB, answers are very appreciated need to study pl 2. Write two m-file functions...
USE MATLAB TO WRITE A CODE FOR THIS
2. Writ example 4.5% as 4.5) and the number of monthly payments (use the Calculate the down payment using the percent down payment e e a program that gets a cost, percent down payment, annual interest rate as a percent (for ntered, the loan amount (cost - own payment) and monthly interest rate as a decimal number -not a percent. Call your payment function to calculate the payment on the loan amount....
MATLAB!!! CAN SOMEONE SOLVE THIS PROBLEM ON MATLAB?? THANK
YOU
PART B: HOUSING LOAN CALCULATOR In this part of the assignment, you are expected to develop a program that calculates housing loan pay- ments based on compound interest formulas The program should prompt a user to input the amount borrowed (principal), p, the number of monthly payments, n, and an annual interest rate in R percent. The program should convert the annual interest rate R into a monthly interest rate...
%%Python Question%% get_min_payment() • Parameters ◦ the total amount of the mortgage (called the principal; should be a positive number) ◦ the annual interest rate (should be a float between 0 and 1) ◦ the term of the mortgage, in years (should be a positive integer; default value: 30) ◦ the number of payments per year (should be a positive integer; default value: 12) • Functionality ◦ Compute the minimum mortgage payment. Should use the formula A= Pr(1+r) n (1+r)...
i would like someto check these answers and see if they are
right or wrong. if wrong please help
250,000 Mortgage Calculator Mortgage Interest Rate Periods Per year 6 % Mortgage Type (Year) 10 o Payment per period $2,775.51 1 Total principal and interest $333,061.51 12 Total Interest Paid $83,061.51 1 5 $2,109.64 $379,735.57 $129,735.57 3 0 $1,498.88 $539,595.47 $289,595.47 13 15 Mortgage Calculator 1250000 5 Mortgage 6 Interest Rate 7 Periods Per year 10.06 9 Mortgage Type (Year) 10...
Problem 1 In this problem, you will write two functions. The first function takes in a string and returns that string without any dashes. The second function takes in the first and last name and returns a string that is lastname_firstname and uses the previous function to remove any dashes (-) in the name. Note that you’ll be testing it by calling it from the command line; you’ll call it from a script in problem 3. Deliverables: Function file that...
Please help with this code
For the following problem write a Matlab® script file with
clear commentary for each line of code.
Your script should:
Load the data in the problem as a text file.
Calculate the statistics using
Matlab functions.
Solicit input from the user of the reading (for example, 137
degrees as stated in the problem). In another word, the reading
should not be fixed in the script and has to be entered and saved
from the command window...
I just need help with the last two answers.
I am not sure why they were counted as incorrect? Thanks.
Five years ago, Diane secured a bank loan of $380,000 to help finance the purchase of a loft in the San Francisco Bay area. The term of the mortgage was 30 years, and the interest rate was 9% per year compounded monthly on the unpaid balance. Because the interest rate for a conventional 30-year home mortgage has now dropped to...
Can you please solve this and show the steps
Im using a financial calculator, so please list the inputs.
2. Mr. and Mrs. Spirit purchased a $35,000 house 20 years ago. They took a 30-year mortgage for $30,000 at a 3% annual interest rate. Their bank, the First Amityville National Bank, has recently offered the Spirits two alternatives by which they could prepay their mortgage. The Spirits have just made their 20th annual payment. [A] Under the first alternative, the...
My library>CptS 111 home> 2.9: zyLab PA #1: Student Loan R oks zyBooks cat @Help/FAQ θ Mohammed Al Shukaili 2.9 zyLabPA#1:Student Loan RepaymentCalculator For this assignment you wil write a program to calculate the monthly payments required to pay back a student loan You vill need to prompt the user for the following values Annual interest rate (as a percentage) Number of years to repay loan . and display the output in a readable form. Output should include Amount of...
Mortgage Analysis Part I You are planning to purchase a house that costs $480,000. You plan to put 20% down and borrow the remainder. Based on your credit score, you believe that you will pay 3.99% on a 30-year mortgage. Use the function “PMT” to calculate your mortgage payment. Calculate the total cost of the home purchase. (Down payment plus principal (loan amount) plus interest.) Calculate how much interest you will pay in total? Assume that you plan to pay...