Please find required MATLAB code along with necessary details in comments below:
clc; % clear command window
clear all; % clear workspace
cost=input('Enter the cost:');
percent_down_payment=input('Enter the percent downpayment (in
%):');
annual_intrest_rate=input('Enter the annual intrest rate (in
%):');
num_months=input('Enter the number of monthly payment:');
down_payment=(percent_down_payment/100)*cost; % downpayment
loan_amount=cost-down_payment; % amount of loan
monthly_intrest_rate=annual_intrest_rate/12; % monthly intrest
rate
payment_amt=payment(loan_amount,monthly_intrest_rate,num_months); %
call payment function
total_intrest=(payment_amt*num_months)-loan_amount; % total intrest
to be paid
% display the result
fprintf('The payment on a $%3.2f loan for %d months at an intrest
rate of %3.2f%% is $%3.2f and the total intrest is $%3.2f',
loan_amount,num_months,annual_intrest_rate,payment_amt,total_intrest)
function
payment_amt=payment(loan_amount,monthly_intrest_rate,num_months)
% calculate the intrest
intrest=(loan_amount*monthly_intrest_rate*num_months)/100;
% total amount to be paid
amount= loan_amount+intrest;
% calculate monthly emi
payment_amt=amount/num_months;
end
----------------------------------- SCREENSHOT OF CODE
------------------------------------------- SAMPLE OUTPUT
USE MATLAB TO WRITE A CODE FOR THIS 2. Writ example 4.5% as 4.5) and the...
PLEASE HELP, MATLAB, answers are very appreciated need to study pl 2. Write two m-file functions that will allow you to compare mortgages cakculations for the monthly payment and compare mortgage with different loan values. The monthly payment M, is calculated using 1-2)1 Where Pis the principal loan amount, r is the interest rate (in decimal form not percent form), and y is the number of years of the loan. Create an m-file function called "mortgage_a.m" that will serve as...
The program is in python :) Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1+r)n-1 Where: M is your monthly payment P is your principal r is your monthly interest rate, calculated by dividing your annual interest rate by 12. n is your number of payments (the number of months you will be paying the loan) Example: You have a $100,000 mortgage loan with 6 percent annual...
In C. Thank you! Bank Write a program to calculate the monthly payment on a loan given the loan amount, interest rate and the number of years to pay off the loan. Then add a function to print an amortization schedule for that loan. Create a class to save the current balance and the rest of the data as private data. Add member functions to make a payment and to print the amortization report. Use the following class header. Class...
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...
6. Loan Calculator The e most common types of loans are mortgage loans, which are tinance the purchase of a house, and car loans. A loan consists of four com- L1 ponents--amount, interest rate, duration, and periodic payment. The purpose values of the other three components. prograrmming project is to calculate the value of any one of the components given the We will ascurme that the duration is in months, that interest (given as a percent) i gages typically have...
c++ and please add tables and everything and make sure program is complete. Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a filo Menu will be the following Enter (1) to calculate your loan monthly payment Enter (2) to calculate your loan monthly payment & write to a file Tips: Compound Interest Formula A =...
Matlab question: there are some pretest provided and the Matlab code should not include any loops. Loan Payment Table (matrix creation) 0 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: Where i is the monthly interest rate (decimal value), computed from an annual rate (decimal value not percent)ras/12, and n is the number of months in the term of the loan...
You will compare 2 different amortization schedules when buying a car. The purchase price is $17,500. Bank A requires a 20% down payment and has an annual interest rate of 3.6%. Bank B wants only 10% down payment but the annual interest rate is 4.8%. In both banks, the loan will be paid off in 3 years. Formulas: A.First you need to set up the formula to find the monthly payment. Use the PMT function under FINANCIAL FORMULAS. B. After...
Total Loan amount: The total mortgage loan amount is the amount you borrow after paying your down payment. Here, we assumed that you would pay 20% of the home value (property value) as a down payment. 2. Months: The mortgage payment period is set to 30 years. In terms of months, this is equivalent to 30 years multiplied by 12 months. We put our primary basis of payments in terms of months, which is why we need to convert everything...
Only Problem 2!!! MATLAB only and please comment as well. Received this problem for homework and am struggling! Problem 2. or the discrete dynamical system (n+1)2(n) with a(0)0.2, plot the z(n) for n-0 to 10. Describe what happens to x(n) as n increases? What is the limit of x(n) as n gets large? Problem 3. For the discrete dynamical system n + 1)5+1 with (0) 1, plot the r(n) for n-0 to 10. Describe what happens to x(n) as n...