Burses Luis Integration Documentation ENGR 1221 - Programming Matlab (6595) > Exercise 6 > Problem 2 O solutions submitted (max Unlimited) Present Value of an Annuity Retirees often purchase an annuity to give them stable income for a number of years. In this type of investment the recipient gives the provider (usually an insurance company afred sum and receives equal payments for a specified number of years The present value of an annuity is the lump sum amount that is deemed to be economically equivalent to the annual payments, assuming a certain rate of interest For example, the annuity pays $1.000 year for 20 years, the present value would be something LESS than 520 000, because money received in the future is valued less than money received today The present value is defined as follows PV = A + + ) where A is the amount of the annual payments and is the interest rate expressed as a fraction (So if the interest rate is 10 5. 0.10) of in more compact notation PV - A 1 where is the number of years over which the annuity pays out Wintea function to calculate the present Value of an annuity, given the interest rate as a percentage the number of years, and the annual payment You should be able to do this with any operations and busin functions without ng is loop Euction sociations Function we present value guments payment the an s we as a percege years per of the means teamount of money recerved each year as Function L uya ng matlab-6595/problems/132241-problem-2/solutions new Close Courses Misintegration Documentation We a function to calculate the presente antygen terrestre as a percent functions without using a loop member y o ur payment you so dos ramy open Function specifications Function name present value Input arguments payment (scalar) - the amount of money received each year, rate (scalar) - the anual interest rate as a percentage years (scalar) - penod of the investment in years Output argument PV (scalar) - the present value Function Reset DOM Code to call your function 1 Example call 2 payment - 1000; amount of annual payment rate = 20; annual interest rate in years = 5; duration of the annuity in years P1 = present value(payment, rate, years) ENGR 1221 - Programming Matlab (6505) > Exercise 6 > Problem 2 O solutions submitted (max Unlimited) Present Value of an Annuity Retirees often purchase an annuity to give them stable income for a number of years in this type of investment the recipient gives the provider (usually an insurance company afred sum and receives equal payments for a specified number of years The present value of an annuity is the lump-sum amount that is deemed to be economically equivalent to the annual payments assuming a certain rate of interest. For comple, the annuity pays $1000 year for 2 years, the present Value would be something LESS than $20 000 because money received in the future is valued less than money received today The present value is defined as follows PV - A + +.) where is the amount of the annual payments and is the interest rate expressed as a fraction (So if the interest rate is 10.10.10) or in more compact notation PV = where is the number of years over which the annully pays out Write a function to calculate the present value of an annuity oven the interest rate as a percentage, the number of years, and the annual payment You should be able to do this with array operations and built-in functions without using a loop Function specifications Function name present value Input arguments payment (scalar) - the amount of money received each year rato (scala)-the anual interest rate as a percentage years scalar) - ponod of the investment in years Output argument PV (scalar) - the present value Purullalle. pieser value Input arguments payment (scalar) - the amount of money received each year, rate Output argument PV (scalar) - the present value Function Code to call your function %Example call payment = 1000; %amount of annual payment 3 rate = 20; annual interest rate in % 4 years = 5; duration of the annuity in years 6 P1 = present_value (payment, rate, years) Assessment: rch ORL e