Question: Problem Two: (Based on Attaway. Chapter 6, Exercise 16) The annual payment to be paid when interest on a loan is compounded annually is given
Problem Two: (Based on Attaway. Chapter 6, Exercise 16) The annual payment to be paid when interest on a loan is compounded annually is given by: (1+)" A =P (1 + )" - 1 where, P is the principal invested, is the interest rate, and is the number of years. Write a MATLAB function, name it myLoan, that plots the annual payments A for years from I to n. Consider the following: a) The function accepts P and n as inputs. b) The interest rate i is an optional input. Its default value isi -0.05 (5%). c) Besides plotting the annual payment (Avsn), the function returns the annual payment at n. d) Error-check to make sure that the user enters the number of years as a positive integer. Page 1 of 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
