Question: Matlab help needed QUES Write a MATLAB function named car_loan that takes 4 input arguments: the p the car, the down-payment, loan period, and interest

Matlab help needed  Matlab help needed QUES Write a MATLAB function named car_loan that

QUES Write a MATLAB function named car_loan that takes 4 input arguments: the p the car, the down-payment, loan period, and interest rate in %, and generate 4 output arguments: the principal, interest paid to the bank, the balance of the loan, and monthly repayment amount. Some basic formulas are given below: Total loan- Car price -Down payment Total principal (Total loan x Loan period x Total interest Total loan x Loan period Interest rate Interest rate) +Total loan The function should calculate the amount of principal, interest paid, and balance to be paid every year until the loan ends. When executed, the function should display the amount of monthly repayment, the total principal amount, and the total amount of interest. In addition, the function should plot the graph of principal, interest paid, and balance versus loan period in year. Provide a plot title and labels for the axes as shown. An example run of the function for a car price of RM 152,000, a down-payment of RM 16,000, a loan period of 9 years, and an interest rate of 2.3 % is as follows: >>iprincipal,interest,balance,monthly) - 2 (152000,16000, 9,0.023) Honthly repayment is RM1519.93 Total principal amount is RM164152.00 Total interest amount is RM28152.00 o Principa Interest and Balance versus Loan Period 12 10 Biance Period (years

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!