Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions