Question: Please answer in MATLAB. Do not copy or repost a previous answer. ENGR 1221 - Programming Matlab (9794) > Exercise 5 > Problem 4 O

Please answer in MATLAB. Do not copy or repost a previous answer.Please answer in MATLAB. Do not copy or repost a previous answer.

ENGR 1221 - Programming Matlab (9794) > Exercise 5 > Problem 4 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) a lump 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, if the annuity pays $1,000 year for 20 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 (assuming annual payments) is defined as follows: PV-AI T+r* 1+2 where A is the amount of the annual payments and r is the interest rate expressed as a fraction. (So if the interest rate is 10%, r = 0.10) or in more compact notation: PV = A2-i-1 where n is the number of years over which the annuity pays out. + Write a 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 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, rate (scalar) - the anual interest rate as a percentage; years (scalar) - period of the investment in years Output argument PV (scalar) - the present value Function e Reset E MATLAB Documentati Code to call your function RE %Example call payment = 100; amount of annual payment 3 rate = 20; annual interest rate in % 4 years = 5; duration of the annuity in years P1 = present_value(payment, rate, 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!